-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent component from re-rendering on change #410
Comments
I haven't used the following but @rstacruz created deku-memoize - a higher order component which uses your component's See discussion in #336. |
Well, that's depends if you want to never re-render it of if you want to re-render only if props change. Never re-renderIn the first case, you can simply make a singleton:
Now, each time Re-render only on props changeYou can use deku-memoize as already suggested, or
In case you have more than one instance in the same |
Previously in version 1.0.0 we had lifecycle methods such as
shouldUpdate
to prevent a component from re-rendering on change. I'm wondering how other folks are handling this now, seeing most of these methods no longer exist.I have a component displaying a video camera that I don't want to re-render while other changes/updates are being fired from my redux store.
The text was updated successfully, but these errors were encountered: