Skip to content

Uncaught (in promise) Error: failed to get navigator #3068

Answered by WorldSEnder
riley-martin asked this question in Q&A
Discussion options

You must be logged in to vote

You are possibly stumbling over the same issue as in #2903. I thought documentation got improved since then, was there still something unclear?

Most of yew-router's components, in particular <Link /> and <Switch />, must be (grand-)children of one of the Router components (e.g. <BrowserRouter />). You usually only need a single Router in your app, most often rendered immediately by your most top-level <App /> component. The Router registers a context, which is needed for Links and Switches to function.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@riley-martin
Comment options

Answer selected by riley-martin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants