mirror of
https://github.com/SomboChea/ui
synced 2024-09-29 04:47:47 +07:00
16 lines
340 B
JavaScript
16 lines
340 B
JavaScript
|
/**
|
||
|
* @prettier
|
||
|
*/
|
||
|
|
||
|
import {createBrowserHistory} from 'history';
|
||
|
|
||
|
const history = createBrowserHistory();
|
||
|
|
||
|
// Listen for changes to the current location.
|
||
|
history.listen((location, action) => {
|
||
|
// location is an object like window.location
|
||
|
console.log('====>', action, location.pathname, location.state);
|
||
|
});
|
||
|
|
||
|
export default history;
|