Skip to content

Attempted import error: ‘Link’ is not exported from ‘react-router’. – React error. How to fix?

To fix this error, change your import statement from import { Link } from ‘react-router’ to:

Advertisements
import { Link } from 'react-router-dom'

See also  How to set background image in React?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.