Open
Description
Hello Sir
I have below routing in app function:
<Route exact path="/" component={ListOfItems}></Route>
<Route path="/list/:searchquery?" component={ListOfItems}></Route>
second Route is working well when i pass any search term but when i try to access first route '/' using history.push('/') calling by function it changes the url in the browser but does not render the component of '/' route.
import { createBrowserHistory } from "history";
const history = createBrowserHistory();
const redirectToHome = () => {
history.push('/');
}
could you please suggest me what is the issue? Thanks a lot.
Metadata
Metadata
Assignees
Labels
No labels