Replies: 1 comment
-
I think it depends what the app does. Sometimes you will need to cause a rerender to safely update the application state. If it's just small dom manipulation for animations then you can probably get away with it, but if the data changes then you'll want to re-render otherwise a later re-render could cause unexpected effects imo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi and thanks for the wonderful library!
I'm building an app that could be described as one which lets you structure your notes like a tree (akin to WorkFlowy)
I've made some features like adding nodes, folding/unfolding them, zooming in/out etc. utilising react hooks + useSpring, but then decided to implement a smooth reordering based on this example: https://codesandbox.io/embed/r5qmj8m6lq
There, the whole reordering process happens without rerendering, whereas in my previous code some animations are already triggered by React hooks (which obviously rerenders everything).
Considering the fact that I have to merge those two pieces, I was wondering whether or not it's a good idea to rewrite my previous code to work without React hooks or is there another good way to combine the above-mentioned parts?
Please let me know if more information is needed and thank you for taking your time reading this.
Beta Was this translation helpful? Give feedback.
All reactions