-
DescriptionHello everyone, I need a Let's keep it simple : const { Link, redirect, usePathname, useRouter } =
createLocalizedPathnamesNavigation({
locales: ['en', 'fr'],
localePrefix: 'as-needed',
pathnames,
});
const AnalyticLinks = React.forwardRef<
React.ElementRef<typeof Link>,
React.ComponentPropsWithoutRef<typeof Link>
>(props, ref) => {
return <Link ref={ref} ...props /> // <-- error here
}
So I just tried to check what is inside It mostly related to HOW this is typed, because when used directly the Link have the correct props AND typed And we're not safe from an error on my part 🤭 If I can be of any form of help do not hesitate to reach out! Kind regards 😄 Verifications
Mandatory reproduction URLhttps://github.com/JulienRst/next-intl-bug-repro-app-router Reproduction description
Expected behaviourAs I was working with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Please see How can I compose the link with its href prop? in the docs for Going to move this to a discussion since it's a usage question and not a bug report. |
Beta Was this translation helpful? Give feedback.
-
Hey there, thanks for your answer, it really helped me out ! |
Beta Was this translation helpful? Give feedback.
Please see How can I compose the link with its href prop? in the docs for
Link
(make sure you have "Localized pathnames" selected).Going to move this to a discussion since it's a usage question and not a bug report.