You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using use useRouter hook from next13-progressbar it is never memoized and causes an infinite loop when using it as a dependency for useEffect
To Reproduce
Steps to reproduce the behavior:
import { useEffect } from "react";
import { useRouter } from "next13-progressbar";
export function Example() {
const router = useRouter();
useEffect(() => {
console.log("I will infinitely repeat");
}, [router]);
return (
<div>
<h1>Example</h1>
</div>
);
}
Expected behavior
The useRouter instance should never re-trigger a change when used inside a useEffect
The text was updated successfully, but these errors were encountered:
I don't know but in my case using it as dependency in useEffect don't cause infinite loop. So maybe you can check if there may be another reason for it.
Describe the bug
When using use
useRouter
hook fromnext13-progressbar
it is never memoized and causes an infinite loop when using it as a dependency for useEffectTo Reproduce
Steps to reproduce the behavior:
Expected behavior
The
useRouter
instance should never re-trigger a change when used inside auseEffect
The text was updated successfully, but these errors were encountered: