Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const state = store$.getState();
if (state[locationStorageKey]) {
history.replace(state[locationStorageKey]);
}
}, []);
useEffect(() => {
const unlisten = history.listen((location) => {
routerChanged.with(location).invoke(store$);
});
return () => {
unlisten();
};
}, []);
useEpic(createRouterEpic(history));
return null;
}