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
Highway crashes on import (SSR) #64
Comments
Hello @fsdiogo, There is no support of React applications because there is no need of Highway for this type of project. The routing is managed by Next.js and there are already plenty of good tools for animations in React:
Best regards, |
Hi @Anthodpnt, I've used Thanks anyway! |
Hello @fsdiogo, For page transitions under Next, I am currently working with next-page-transition module It seems to do the job pretty well, just keep in mind that having both views overlapping at the same time is not possible with this module. Have a great day |
Hi @ThaoD5, I gave that a go too and it worked well yes, but it had some drawbacks like no scroll restoration and no out-of-the-box support for css modules due to not spreading some props to If I have the time maybe I'll try to use Thanks, you too! |
I'm using Next.js which has server-side rendering and Highway crashes on import due to the
window
not being defined in the server.With a quick look in the source code, I've found that changing this line
highway/src/helpers.js
Line 10 in 4b4457e
to something along the lines of
stops the crash (at least with the features of Highway I'm using at the moment).
I still have to import the non-built version to make it work even after rebuilding the project with the mentioned change (I'm npm linking the project):
Do you have something planned to make Highway work with SSR?
The text was updated successfully, but these errors were encountered: