Closed KirianCaumes closed 1 year ago
I have the same issue with a brand new Remix project. This can be seen by running npx create-remix@latest
and then installing this package. All client-side routing breaks with the rules of hooks error, though in Remix it's on RemixBrowser.
Here is a sample repo showing the error, just clone, install deps, and run it to see: https://github.com/bduff9/remix-broken-whydidyourender
Experiencing similar problem but in react native. Sorry, I don't have steps to reproduce, but this is the stacktrace.
Definedly not breaking rules of hooks in my code.
The library will not work if any elements were created before it's loaded. so this:
(await import('@welldone-software/why-did-you-render')).default(React)
is certainly wrong.
Find a way to import it not asynchronously.
Solve the problem with this: https://github.com/welldone-software/why-did-you-render/issues/243#issuecomment-1132892461
Hello,
I have a problem with
why-did-you-render
andreact-router-dom
.Problem
When I use the router and especially a link to change the page, this error is thrown:
The problem seems to be inside the BrowserRouter and only appears when the
why-did-you-render
plugin is enable.I've tried to add/remove React.StrictMode but it doesn't change anything.
Steps to reproduce
This issue can be reproduced with the starting template from Vite and the Typescript version.
Version of libraries:
I'm not sure what to try to fix or work around this problem, so thanks in advance for your help 🙏