Next.js Discord

Discord Forum

routing with Link

Unanswered
Carea Castellano Manchego posted this in #help-forum
Open in Discord
Carea Castellano ManchegoOP
when i use Link compoent for routing, the component doesn't add to the browser history but replace the last segment, any idea on how to achieve the behaviour of push to the history?

1 Reply

Plott Hound
By default Link will not replace the history state unless you use the replace prop

https://nextjs.org/docs/app/api-reference/components/link#replace