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

You should not use <Link> outside a <Router> #3019

Closed
eligao opened this issue Mar 18, 2019 · 1 comment
Closed

You should not use <Link> outside a <Router> #3019

eligao opened this issue Mar 18, 2019 · 1 comment

Comments

@eligao
Copy link

eligao commented Mar 18, 2019

What you were expecting:
Proper rendering

What happened instead:

Invariant Violation
You should not use <Link> outside a <Router>

Steps to reproduce:
Follow the official tutorial till this section:
https://marmelab.com/react-admin/Tutorial.html#mapping-api-endpoints-with-resources
This also happens when I upgrade my old project to new react-admin (currently 2.8.2)

Related code:

Other information:

Environment

  • React-admin version: 2.8.2
  • Last version that did not exhibit the issue (if applicable): previously I was using 2.2.0
  • React version: 16.4.2, 16.8.4
  • Browser: Chrome 73.0.3683.75
  • Stack trace (in case of a JS error):
Invariant Violation
You should not use <Link> outside a <Router>
▶ 21 stack frames were collapsed.
evaluate
/src/index.js:9:9
   6 | import App from "./App";
   7 | 
   8 | const rootElement = document.getElementById("root");
>  9 | ReactDOM.render(<App />, rootElement);
     |         ^
  10 | 
View compiled
▶ 10 stack frames were collapsed.
@eligao
Copy link
Author

eligao commented Mar 18, 2019

looks like a dup of #3018

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

2 participants