-4

Installed react-router like npm --save react-router and cant use Link. How can i fix it?

Screenshot

Ali BAGHO
  • 358
  • 6
  • 17
EnzyWeiss
  • 198
  • 1
  • 2
  • 12
  • Thanks all. Sorry for that question, im newbie in React and didnt find any information of this. – EnzyWeiss Aug 11 '17 at 09:31
  • Possible duplicate of [react router version 4 not rendering anything](https://stackoverflow.com/questions/45412714/react-router-version-4-not-rendering-anything) – Shubham Khatri Aug 11 '17 at 09:52

3 Answers3

1

You needs react-router-dom:

import { Link } from 'react-router-dom'
Evgeny Samsonov
  • 2,730
  • 4
  • 19
  • 28
1

If you're using React for web, Try this

import { Link } from 'react-router-dom'
kotAPI
  • 1,073
  • 2
  • 13
  • 37
0

You only need to import react-router-dom to use Link in V4

https://github.com/ReactTraining/react-router/issues/4648