DEV Community

Arefin Aareef
Arefin Aareef

Posted on

Link is updating address on click but not rendering page content unless reloading full page.

< Link to=" / post" > Post < / Link > in nav.js is updating address on click but not rendering page content unless reloading full page. I've tried like this:
< a onClick={() = > {window.location.href="/post"}} >Post< /a >
But now page content is rendering but every time on click whole page is reloading, which is not good i suppose. I've found my self using v6:react-router-dom so I dropped down to v5. It helped me unstack one problem using Switch but in case of Link I'm stuck again. Can not move on. Any help? Git Link:
https://github.com/arefin-aareef/blogApp

Top comments (1)

Collapse
 
markmatute profile image
Mark Matute

was this resolved?