question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shared Routing Example - You should not use <Link> outside a <Router>

See original GitHub issue

In the Shared shared-routing example, when the remote component has a Router’s <Link> inside, i get an error:

“You should not use <Link> outside a <Router>"

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ScriptedAlchemycommented, Jul 17, 2020

You didn’t share react router libs between two bi-directional instances

0reactions
piniTayebcommented, Nov 17, 2020

can you make a repo with this error?

Read more comments on GitHub >

github_iconTop Results From Across the Web

You should not use <Link> outside a <Router> - Stack Overflow
Router can have only one child, so wrap all the routes in a div or Switch. React-Router V4, doesn't have the concept of...
Read more >
Broken SSR: You should not use <Link> outside a <Router ...
On the client, it's rendered inside a BrowserRouter , and on the server it's rendered inside a StaticRouter . Client: hydrate( <BrowserRouter> < ......
Read more >
Primary Components - React Router v5
Primary Components. There are three primary categories of components in React Router: routers, like <BrowserRouter> and <HashRouter>; route matchers, ...
Read more >
React Navigation - Ionic Framework
The React Navigation guide covers routing in an app built with Ionic and React. Learn to define a redirect path for router links...
Read more >
Invariant failed: You should not use NavLink outside a Rou
I will try to help you. Probably this problem is from our dependencies. Because we did import react-router-dom for our package and we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found