-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
next/link links with hash not working #65
Comments
P. S. Wrapping setResult call in additional
|
@iAdramelk where did you include that snippet? |
@helloworld sorry for the late answer. At the line 60 of hydrate.js, I'm wrapping |
Same issue here. |
I'm having the same problem. I have Uncaught (in promise) Error: The provided `href` (/[slug]#section-id) value is missing query values (slug) to be interpolated properly. Read more: https://err.sh/vercel/next.js/href-interpolation-failed
at Router._callee$ (router.ts?35b8:810)
at tryCatch (runtime.js?96cf:63)
at Generator.invoke [as _invoke] (runtime.js?96cf:293)
at Generator.eval [as next] (runtime.js?96cf:118)
at asyncGeneratorStep (asyncToGenerator.js?c973:3)
at _next (asyncToGenerator.js?c973:25) |
Just curious: did you do this by setting the |
nevermind. turns out it's both. I digress. :) |
This should be resolved as of v3. Has anyone had a chance to check and confirm? |
Didn't see it mentioned in the release notes but I'll try it out! Thanks. |
@brandonpittman just wanted to check if you could confirm here? |
@jescalan I can confirm this works! Also, first time using the new API and it's lovely. ❤️ |
wonderful! thanks so much. will close this one out! |
I'm trying to render markdown docs using
mdx
andnext-mdx-remote
. I replaced standard<a>
tags in docs withnext/link
for smoother navigation. It works, but if the link has fragment link, e. g.docs/page#about
, then navigation to anchor on page load didn't work. If I just renderrenderOutput
todangerouslySetInnerHTML={{ __html: mdx.renderedOutput }}
, then everything works correctly.My guess is that bug happens because navigation to hash hapens at the time then
hydrate
is replacing the page content and there are no actual anchor on the page.The text was updated successfully, but these errors were encountered: