Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the context in the onEnter is callback on the Route definition returns undefined on first-load during runtime #1529

Open
Zebeqo opened this issue Apr 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Zebeqo
Copy link

Zebeqo commented Apr 29, 2024

Describe the bug

When first loading, onEnter runs before loader and context in onEnter is always undefined.

Your Example Website or App

https://stackblitz.com/edit/github-h2bsvy

Steps to Reproduce the Bug or Issue

  1. The application loaded and the console output context from onEnter undefined and context from loader {test: 'abc'}
  2. Go to the /about page and back to /, the console output context from loader {test: 'abc'} and context from onEnter {test: 'abc'}

Expected behavior

The application loaded and the console output context from loader {test: 'abc'} and context from onEnter {test: 'abc'}

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 124.0

Additional context

No response

@Zebeqo Zebeqo changed the title 'context' in 'onEnter' is always undefined on first load context in onEnter is always undefined on first load Apr 29, 2024
@SeanCassiere SeanCassiere added the bug Something isn't working label Apr 30, 2024
@SeanCassiere SeanCassiere changed the title context in onEnter is always undefined on first load the context in the onEnter is callback on the Route definition returns undefined on first-load during runtime Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants