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
I would expect the ref to be passed all the way down to Next.js's Link.
Since BaseLink already contains a forwardRef, I believe adding a forwardRef to Link would suffice. I've tried the following code locally (npm link) and it seems to fix the issue.
Great point, thanks for the detailed bug report and the analysis! I've just added #300 to address this and will cut a patch release once CI passes. I'll also publish a new RSC beta release on top of this, in case you use that.
I'm happy to open a PR if that solution looks good!
Sorry, I saw this a bit too late! In case you want to contribute in the future you're more than welcome to! 🙂
Description
Passing a
ref
prop to theLink
component causes the following error:Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://github.com/alcar/next-intl-ref-issue
Reproduction description
Steps to reproduce:
npm i
.npm run dev
.Expected behaviour
I would expect the
ref
to be passed all the way down to Next.js'sLink
.Since
BaseLink
already contains aforwardRef
, I believe adding aforwardRef
toLink
would suffice. I've tried the following code locally (npm link
) and it seems to fix the issue.I'm happy to open a PR if that solution looks good!
The text was updated successfully, but these errors were encountered: