-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
Route.to becomes undefined
after a HMR save
#1640
Comments
Need a minimal reproduction with the steps required to trigger the behavior you described. You can create a reproduction using the Router file-based stackblitz starter. |
@SeanCassiere To reproduce the error as described, please follow the steps below:
By following these steps, you should be able to reproduce the issue. |
undefined
after a HMR save
This is an issue with HMR (hot-module-reloading) both with and without codesplitting. The only scenario I wasn't able to reproduce this bug was using the This has probably been around for a while but has gone undetected since most folk likely use strings for their navigation. @vishal-tiwari for the time being I'd recommend using strings for your navigation. HMR bugs are the most difficult to debug You may want to checkout #1353 and see if any solutions from there work for you. If you are feeling brave, you could try the flag I mentioned above (it's pretty good tbh). |
Describe the bug
When making changes to the generateShareableHook function, the route created by createFileRoute starts returning undefined on the development server. This issue affects navigation and component rendering, causing the application to malfunction.
Steps to Reproduce:
Expected Behavior:
The route created by createFileRoute should maintain its definition and be correctly resolved, regardless of changes to the generateShareableHook function.
Actual Behavior:
After making changes to the generateShareableHook function, the route.to property in the Home component returns undefined, breaking the routing functionality.
Additional Information:
Environment:
Please look into this issue as it significantly hampers the development workflow. Thank you!
Your Example Website or App
NA
Steps to Reproduce the Bug or Issue
Make any changes in
generateShareableHook
, this will make the route undefined.Expected behavior
The route created by createFileRoute should maintain its definition and be correctly resolved, regardless of changes to the generateShareableHook function.
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: