Answer the question
In order to leave comments, you need to log in
How to remove match.params from the router when redirecting?
My routes look like this:
const routes = [
{
path: '/',
component: Home,
},
{
path: '/chat',
component: Chat,
},
{
path: '/chat/:action',
component: Chat,
}
];
history.push('/chat');
Answer the question
In order to leave comments, you need to log in
I think, instead of parameters, nested routes are more suitable here. Parameters are usually used to work with dynamic content.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question