🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering.
7.19k
stars
486
forks
source link
the `context` in the `onEnter` is callback on the Route definition returns `undefined` on first-load during runtime #1529
Open
Zebeqo opened 2 weeks ago
Describe the bug
When first loading,
onEnter
runs beforeloader
andcontext
inonEnter
is always undefined.Your Example Website or App
https://stackblitz.com/edit/github-h2bsvy
Steps to Reproduce the Bug or Issue
context from onEnter undefined
andcontext from loader {test: 'abc'}
/about
page and back to/
, the console outputcontext from loader {test: 'abc'}
andcontext from onEnter {test: 'abc'}
Expected behavior
The application loaded and the console output
context from loader {test: 'abc'}
andcontext from onEnter {test: 'abc'}
Screenshots or Videos
No response
Platform
Additional context
No response