0

I have a navbar with links that scroll to sections of page using react-scroll. i also have several pages and im using react-router-dom for navigating between pages. but when i click on the links in navbar when on a different page, it says element not found. so i wrapped the link in Navlink from react-router-dom. now this works as i want it but on a different page when i want to switch pages, it takes a lot of time to render the switched page. almost like 2-3 seconds. and if i dont use react-scroll, the pages are rendered instantly.

so is there a way to use react-scroll and react-router-dom without causing this delay?

ZeusHunter
  • 21
  • 2

1 Answers1

0

there is a youtube tutorial if you would like to have to a look, it build website from scratch using router and react-scroll:


https://youtu.be/Nl54MJDR2p8

Johan
  • 95
  • 7