-
Notifications
You must be signed in to change notification settings - Fork 11
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
Rerenders all components #56
Comments
Given that modal components with props are stored in the object in the Context - yes, any change in it causes the re-rendering of components dependent on this Context. React is really very fast and it should not cause any noticeable problems, but I'll think about optimizing this stuff, I'm also open to suggestions :) |
It made me refetch a bunch of data when combining with Apollo Client, so I just seperated it into two contexts, one that just had showModal - this meant I never rerendered when state changed! |
If you don't mind, could you send me an example? |
You can share example ? |
Is it a known issue/just a factor of React Contexts that all components using this library rerenders when a new library calls useModal?
The text was updated successfully, but these errors were encountered: