Skip to content

Double pop-up when <React.StrictMode> is used #5

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

Closed
anmcn opened this issue Aug 4, 2022 · 3 comments
Closed

Double pop-up when <React.StrictMode> is used #5

anmcn opened this issue Aug 4, 2022 · 3 comments

Comments

@anmcn
Copy link

anmcn commented Aug 4, 2022

In React 18, <React.StrictMode> renders twice when in dev mode to detect unintended side-effects:

https://reactjs.org/docs/strict-mode.html#detecting-unexpected-side-effects

This results in the pop-up being created twice, which causes issues for some types of pop-up (OAuth).

@RyanNerd
Copy link
Owner

RyanNerd commented Aug 4, 2022

This is a known React issue that only happens in development builds. Details are here.

@RyanNerd RyanNerd closed this as completed Aug 4, 2022
@anmcn
Copy link
Author

anmcn commented Aug 4, 2022

We're painfully aware of that - this change in React 18 has caused us nothing but grief. We've lost many days chasing down the obscure issues it has caused in third-party components. I understand why they made the change, but I think it will just drive people to stop using <StrictMode>, which is counter-productive.

@RyanNerd
Copy link
Owner

RyanNerd commented Aug 4, 2022

We're painfully aware of that - this change in React 18 has caused us nothing but grief. We've lost many days chasing down the obscure issues it has caused in third-party components. I understand why they made the change, but I think it will just drive people to stop using , which is counter-productive.

I also spent countless hours chasing my tail on this one. For that reason and some other minor issues I don't use it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants