React JS history.listen not firing after page reload – Javascript
I am listening to React history changes in my component like this: const history = useHistory(); useEffect(() => { history.listen(() => { // do something here}); }, [history]); It works as long as page is not reloaded. When i reload…