Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new replace instead of <Navigate> for route replace navs #2352

Open
david-crespo opened this issue Jul 31, 2024 · 0 comments
Open

Use new replace instead of <Navigate> for route replace navs #2352

david-crespo opened this issue Jul 31, 2024 · 0 comments
Labels

Comments

@david-crespo
Copy link
Collaborator

david-crespo commented Jul 31, 2024

We have a few of these and they've never felt quite right. Now we can do them slightly earlier in the render cycle with loader={() => replace('/path')} thanks to remix-run/react-router#11811.

console/app/routes.tsx

Lines 215 to 218 in 07b6c15

<Route index element={<Navigate to={pb.projects()} replace />} />
{/* These are done here instead of nested so we don't flash a layout on 404s */}
<Route path="projects/:project" element={<Navigate to="instances" replace />} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant