diff --git a/src/createRouter.js b/src/createRouter.js index d5ce8ec..8912846 100644 --- a/src/createRouter.js +++ b/src/createRouter.js @@ -75,7 +75,7 @@ export default function createRouter(routes) { }; window.addEventListener('popstate', handlePopState); return () => window.removeEventListener('popstate', handlePopState); - }); + }, [startTransition, navigate]); return ( @@ -139,4 +139,4 @@ function shouldNavigate(event) { event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) ); -}; \ No newline at end of file +};