frontarm / navi

🧭 Declarative, asynchronous routing for React.
https://frontarm.com/navi/
MIT License
2.07k stars 71 forks source link

React.Strict mode forces the getData to run twice #194

Open vongohren opened 3 years ago

vongohren commented 3 years ago

I just did a create react app and recieves the react strict mode <React.StrictMode> around my App. If i just add a simple route that uses getData, or anything withData like that, it ends up running that data function twice. I removed all context and everything but the sinner was <React.StrictMode>

So I guess it is reproducible by just running CRA cli and adding navi to the mix, one with a route that wants to get data

Sorry for not being able to make on right now, just running out of time here, but wanted to leave this breadcrumb of information