In react-router v5 i created history object like this: import { createBrowserHistory } from "history"; export const history = createBrowserHistory(); And then
I want to store url query as a state on location. ~ history.push({ + ...history.location, + search: query.toString(), + state: { + myState
I want to declare a path with an optional path parameter, hence when I add it the page to do something extra (e.g. fill some data): http://localhost/app/pat