Describe the bug
For some unknown reason context is undefined in loader, but it was present in beforeLoad
Your Example Website or App
https://github.com/Arilas/tanter-bug
Steps to Reproduce the Bug or Issue
- Clone
yarn
yarn dev
- Open Host
- Obserse error in
src/routes/_secured.tsx
- Refresh the page
- Now it's working
Expected behavior
It should not clear the context
Screenshots or Videos

Platform
- OS: macOS, iOS, Android
- Browser: Arc, Safari
- Version: latest
Additional context
I've over-simplified our case to the reproducible state. In our case we have a ServiceLocator with multiple factories, dependencies, events.
index.lazy.tsx can be replaced with an route with beforeLoad which will have redirects, but it was an workaround to fix problem previously.
Describe the bug
For some unknown reason context is undefined in loader, but it was present in beforeLoad
Your Example Website or App
https://github.com/Arilas/tanter-bug
Steps to Reproduce the Bug or Issue
yarnyarn devsrc/routes/_secured.tsxExpected behavior
It should not clear the context
Screenshots or Videos
Platform
Additional context
I've over-simplified our case to the reproducible state. In our case we have a ServiceLocator with multiple factories, dependencies, events.
index.lazy.tsxcan be replaced with an route withbeforeLoadwhich will have redirects, but it was an workaround to fix problem previously.