question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

resetNavigationProgress is not working in dev mode with react 18 & strict mode

See original GitHub issue

What package has an issue

@mantine/nprogress

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

sandbox link

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:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rtivitalcommented, Aug 12, 2022

The issue is with strict mode only, it will be resolved in next patch

0reactions
matinrcocommented, Aug 13, 2022

Fixed in 5.1.5 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found