HMR: Invariant failed: trying to access property 'id' on a route which is not initialized yet.
I'm experiencing this error when changing files. Refreshing the page makes the error disappear:
Invariant failed: trying to access property 'id' on a route which is not initialized yet. Route properties are only available after 'createRouter' completed.
The stack trace points to a Route.useRouteContext
call.
I cannot reproduce it with a simple context example. Does anyone have an idea what the reason could be?3 Replies
metropolitan-bronzeOP•13mo ago
I get the same error when editing a Route without context when accessing loaderData:
I updated the dependencies and now the issue is gone. I tried way to long to reproduce this.. 😅
sunny-green•13mo ago
always try updating to the latest version, we fix the issues fast and release often ...
metropolitan-bronzeOP•13mo ago
Yeah. I always try to reproduce but I should update dependencies first