!Stan_---__-
!Stan_---__-
TTCTheo's Typesafe Cult
Created by !Stan_---__- on 10/23/2023 in #questions
Nextjs link tag preserving state when link to same page
I have a Navbar which is a server component that utilizes the next.js <Link>. I have a route (page) that eventually renders a client component with some state. If I call setState and then try to click on the Link from the navbar (href points to the same page), the state from the client component is preserved. Anyone know how I can force this rerender/reset of state?
8 replies