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

useActivate is being fired 3 times #260

Open
husayt opened this issue Mar 13, 2023 · 2 comments
Open

useActivate is being fired 3 times #260

husayt opened this issue Mar 13, 2023 · 2 comments

Comments

@husayt
Copy link

husayt commented Mar 13, 2023

Hi, I have implemented keepalive for tab switching and get this weird behavior when switching between tabs I get useUnactivate fired once and useActivate fired three times for each tab.

What is the reason for that?

Thanks in advance

@CJY0208
Copy link
Owner

CJY0208 commented Mar 15, 2023

Have you event been using <React.StrictMode />? StrictMode would trigger lifecycle many times which should not be used with react-activation

@husayt
Copy link
Author

husayt commented Mar 27, 2023

Thanks for reply. In dev mode as it is running in strictmode seems this is default behaviour. Is there way to disable strictmode for webpack devserver?

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