1

I have two import packages from the first react

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

and the second

import {Link, Element, animateScroll as scroll} from 'react-scroll'

I get a message like this:

Parsing error: The 'Link' identifier has already been declared

How to handle cases like this?

Smily
  • 2,308
  • 2
  • 17
  • 41

1 Answers1

4

Something like this:

import {Link as Link1} from 'react-router-dom'
import {Link as Link2, Element, animateScroll as scroll} from 'react-scroll'
Faisal Rahman Avash
  • 1,268
  • 9
  • 13