import { createBrowserHistory } from 'history' ; const history = createBrowserHistory ( ) ; history . location = { ... history . location , state : { } , } ; history . listen ( ( ) => { history . location = { ... history . location , state : history . location . state || { } , } ; } ) ; const { go , goBack , push , replace } = history ; export { go , goBack , push , replace } ; export default history ;