Reputation: 61
import React from 'react'
import "./Navbar.css"
import { Link } from 'react-scroll/modules';
import { Link } from "react-router-dom";
In my project I need to use react-scroll and react-router-dom at time in react app but
import { Link } from 'react-scroll/modules';
import { Link } from "react-router-dom";
here show error for import Two package.
Upvotes: -1
Views: 291
Reputation: 585
You can import them like so:
import { Link as ScrollLink } from 'react-scroll/modules';
import { Link as RouterLink } from "react-router-dom";
Upvotes: 1