packageDocumentation module import * as React from 'react' ; import history from 'history/browser' ; param path export const useLocation = ( path ) => { React . useEffect ( ( ) => { history . push ( /^\// . test ( path ) ? path : `/${ path }` ) ; } , [ path ] ) ; } ;