What would cause the `loader` to be called without `context`?
I destructure the
context parameter in the loader function of my route, but randomly, it sometimes throws the error (destructured parameter).context is undefined. Refreshing the page fixes the issue, but I am not sure why the issue is happening in the first place. My beforeLoad method always returns a value (unless the user isn't authenticated, in which case it throws a redirect, but that is not happening here), so from what I can tell, context should never be undefined...
4 Replies
other-emerald•2y ago
we fixed a few context issues lately, which version are you using?
exotic-emeraldOP•2y ago
It "should" be latest since I am using
^ but let me manually update them to the latest and see if there is any changes to the behavior.
Updating did seem to fix a couple of generation issues (specifically one of the lazy routes was using createFileRoute when it should have been using createLazyFileRoute). I will let you know if I still encounter the issue. Thanks!round-purple•2y ago
Hey Manuel, sorry to also ask you this, have the changes by any chance fixed this issue https://discord.com/channels/719702312431386674/1247925709893271552
other-emerald•2y ago
not that I am aware of