How to make a redirect with a dynamic path? #10504
-
I want to redirect from |
Beta Was this translation helpful? Give feedback.
Answered by
brophdawg11
May 22, 2023
Replies: 1 comment
-
Your let router = createBrowserRouter([{
path: "/post/:id",
loader: ({ request, params }) => redirect(`/article/${params.id}`);
}, {
path: "/article/:id",
loader: () => { ... },
Component: Article,
}]); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
arloktev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your
loader
receives therequest
andparams
: