resetNavigationProgress is not working in dev mode with react 18 & strict mode
See original GitHub issueWhat package has an issue
Describe the bug
Hey! 👋
Its kinda related to react 18 useEffect double call in dev mode. 🤔
otherwise all things works great with react 17 or disabled strict mode in react 18.
I’m using nextjs (12). @mantine/nprogress
is configured like the docs exactly.
Test scenario:
1- you are in page A.
2 - navigate to page B with <Link/>
. (progress works correctly)
3- go back from page B to A. resetNavigationProgress
is called but has no effect on progress bar.
What version of @mantine/hooks page do you have in package.json?
5.1.1
If possible, please include a link to a codesandbox with the reproduced problem
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Strict Mode - React
Strict mode checks are run in development mode only; they do not impact the production build. You can enable strict mode for any...
Read more >Using strict mode in React 18: A guide to its new behaviors
Strict mode is trying to be future-ready with React's suspense-based architecture, making it more resilient for introspecting UI issues.
Read more >How to use React Strict Mode in React 18 - Refine Dev
React Strict Mode is a developer tool highlighting potential bugs or issues in a React application's codebase. It provides warnings to ...
Read more >Does strict mode work differently with React 18?
When components are wrapped in StrictMode , React runs certain functions twice in order to help developers catch mistakes in their code.
Read more >[Bug]: <StrictMode> throws error when used with React 18 ...
It will not appear if the app crashes in production. Open your browser's developer console to further inspect this error. This error overlay...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is with strict mode only, it will be resolved in next patch
Fixed in 5.1.5 👍