Skip to content
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

Complete rerender is triggered when using the Provider #1038

Open
justin-betty opened this issue Jun 6, 2023 · 2 comments
Open

Complete rerender is triggered when using the Provider #1038

justin-betty opened this issue Jun 6, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers Needs more info Further information is requested

Comments

@justin-betty
Copy link

Describe the bug
When I try to open a component that lives in a modal and the app is wrapped in the Provider the complete app is re rendering.

simplescreenrecorder-2023-06-06_10.32.18.mp4

To Reproduce
I tried to reproduce it in codesanbox but I can't reproduce it there. So I added 2 video's. One with the provider on without.

Expected behavior
Here I removed the Provider around my app and then you see that the selector component will render

simplescreenrecorder-2023-06-06_10.34.49.mp4

Desktop (please complete the following information):

  • OS: Linux
  • Browser Brave
  • Version 1.52.117
@JohannesKlauss
Copy link
Owner

Without code or anything it's hard to investigate. Do you have a minimal reproducable example? Otherwise I don't know how I can help you

@JohannesKlauss JohannesKlauss added bug Something isn't working Needs more info Further information is requested good first issue Good for newcomers labels Jun 23, 2023
@justin-betty
Copy link
Author

justin-betty commented Jun 23, 2023

I figured out that is has to do something with portal. The content is rendering in that so called variable browser is rendered in a createPortal.
Somehow the content of the portal is emptied directly after opening. Passing the document doesn't work either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Needs more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants