I found that the router.replace function from createSharedPathnamesNavigation differs from others router (createSharedPathnamesNavigation or even next/navigation).
I think it is some kind of issue.
Verifications
[X] I've verified that the problem I'm experiencing isn't covered in the docs.
[X] I've searched for similar, existing issues on GitHub and Stack Overflow.
[X] I've compared my app to a working example to look for differences.
Mandatory reproduction URL
App Router
Reproduction description
Create a simple client component with router.replace on useEffect.
Try with the router returned from createSharedPathnamesNavigation and createLocalizedPathnamesNavigation. The sharred one work as expected (like the next/navigation one for example). But the localized one causes infinte render with the exact same code.
import {createLocalizedPathnamesNavigation, createSharedPathnamesNavigation} from 'next-intl/navigation';
export const locales = ['en'] as const;
export const defaultLocale = 'en' as const;
// Use the default: `always`
export const localePrefix = undefined;
export const {Link, redirect, usePathname, useRouter} =
// Only change the code here to createSharedPathnamesNavigation
createLocalizedPathnamesNavigation({
pathnames: {},
locales,
localePrefix
});
Expected behaviour
Working like others router.replace functions. For sure, it is pretty easy to avoid.
Description
Hello,
I found that the router.replace function from createSharedPathnamesNavigation differs from others router (createSharedPathnamesNavigation or even next/navigation).
I think it is some kind of issue.
Verifications
Mandatory reproduction URL
App Router
Reproduction description
Create a simple client component with router.replace on useEffect.
Try with the router returned from createSharedPathnamesNavigation and createLocalizedPathnamesNavigation. The sharred one work as expected (like the next/navigation one for example). But the localized one causes infinte render with the exact same code.
Expected behaviour
Working like others router.replace functions. For sure, it is pretty easy to avoid.