TLDR Web Dev · OPINIONS & ADVICE

MAYBE DON'T NAVIGATE(-1) IN REMIX/REACT ROUTER

programmingarehard.com4 min read

Summary from the TLDR Web Dev newsletter

Using `navigate(-1)` in Remix/React Router for creating "Back" links can be problematic as it accesses the browser's history, potentially navigating outside the application. A better approach is to use the `Link` component's `state` property to pass a `back` URL, allowing controlled navigation within the app.