prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 556 forks source link

<React.StrictMode> wrapping in index.js by latest cra can cause the AUTH_INIT run twice & also login #946

Open anujmv opened 4 years ago

anujmv commented 4 years ago

Do you want to request a feature or report a bug?
Bug (If this is a usage question, please do not post it here—post it on gitter. If this is not a “feature” or a “bug”, or the phrase “How do I...?” applies, then it's probably a usage question.)

What is the current behavior?

wrapping in index.js by latest cra can cause the AUTH_INIT run twice & also login **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via [codesandbox](https://codesandbox.io/) or similar.** wrapping for component in index.js **What is the expected behavior?** Auth should run once. **Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?**
jordyvg commented 4 years ago

StrictMode runs certain callbacks/methods twice (dev only). See this blogpost.