Closed justin-hackin closed 3 years ago
Please search the existing issues. There's plenty similar ones. If you wanna get there more quickly or directly, search for "whitelisting".
Yes, adding the package react-router-dom
to the whitelist fixed my issue, I had searched issues on the react-router-dom
but forgot to take a closer look here , thanks for identifying the dupe
If I only had a dime for every time someone faces this issue 🙂
"electron-webpack": "^2.8.2"
This repository demonstrates that when a component with react-router-dom hooks is rendered within a Route, the application throws an error suggesting the rules of hooks have been violated. This repository shows the same App is working in the context of a create-react-app.
In order to reproduce the issue, click the "About" link in the app. In the working example, a button is rendered and clicking on it changes the route to the Topics section. In the bugged example, the app crashes.
Variations that did not prove any fix:
render
prop of the Route with an anonymous function component that renders the About section