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

Update to reflect the fact that react-router has loading states now #522

Closed
danielnixon opened this issue Jan 11, 2023 · 0 comments
Closed

Comments

@danielnixon
Copy link
Member

Historically, when you subscribed to navigation events from React Router, you received one event every time a navigation completed.

Somewhere along the way (v6?), they introduced loading states. See https://reactrouter.com/en/main/route/loader and https://reactrouter.com/en/main/hooks/use-navigation#navigationstate.

Other oaf-routing implementations have handled this by simply ignoring the loading states - in those cases we don't want to announce navigation to screen reader users, update page title, repair focus or restore scroll position.

Here's one example: https://github.com/oaf-project/oaf-navi/blob/master/src/index.ts#L58

We'll need to do the same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant