import { createMemoryHistory } from 'history' ; import createInitHistory from '../createInitHistory' ; import type { CreateHistory , InitHistory } from '../createInitHistory' ; import { setHistory } from '../storage' ; const createHistory = ( ) => { const history = createMemoryHistory ( ) ; setHistory ( history ) ; return history ; } ; const initHistory = createInitHistory ( createHistory ) ; export { initHistory } ; export default createHistory ;