Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const listenAndCreateHistory = listen => {
const history = createBrowserHistory()
// Listen for changes to the current location.
history.listen(() => {
if (listen && typeof listen === 'function') {
setTimeout(listen())
}
})
setTimeout(history.listen(), 1000)
}