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
equal-jade•16mo ago
we fixed a few context issues lately, which version are you using?
useful-bronzeOP•16mo 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!other-emerald•16mo ago
Hey Manuel, sorry to also ask you this, have the changes by any chance fixed this issue https://discord.com/channels/719702312431386674/1247925709893271552
equal-jade•15mo ago
not that I am aware of