-
Notifications
You must be signed in to change notification settings - Fork 28.5k
"<Link>" in _document.js doesn't do client-side transitions #1874
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
Comments
AFAIK the custom document is not meant to contain |
But i think its tempting to add something like a menu if that should be on all pages... Maybe add a warning to the documentation? |
Yes, I think a pull request to clarify that could be helpful. |
Thanks @sedubois for helping out. |
Uh oh!
There was an error while loading. Please reload this page.
First: thanks for this guys, this is awesome.
Second: It seems any React onClick-event handlers aren't installed client-side when given via the
_document.js
-file. This way, for exampleLink.onClick
isn't fired for elements in the_document.js
. Or in nested elements, e.g. in a menu on all pages...This may be expected behaviour, but it took me a while to figure out why all
<Link>
's would initiate a server-side transition.The text was updated successfully, but these errors were encountered: