Summary
useAskableNavigationSource() memoizes its source with an empty dependency array, permanently freezing the first render's getPath, getTitle, getParams, maxHistory, describe, and kind values.
The documented React Router/Next.js examples create closures over changing router state. pathname changes trigger notifyChanged(), but source resolution still calls the initial closure and can report the previous route.
Evidence
packages/react/src/useAskableNavigationSource.ts creates the source with useMemo(..., []) around lines 77–80 while notifying on pathname around lines 85–87.
Proposed fix
Use latest-value refs behind stable callbacks, or rebuild/replace the source when relevant options change. Preserve one registration and avoid duplicate navigation history entries.
Acceptance criteria
Summary
useAskableNavigationSource()memoizes its source with an empty dependency array, permanently freezing the first render'sgetPath,getTitle,getParams,maxHistory,describe, andkindvalues.The documented React Router/Next.js examples create closures over changing router state.
pathnamechanges triggernotifyChanged(), but source resolution still calls the initial closure and can report the previous route.Evidence
packages/react/src/useAskableNavigationSource.tscreates the source withuseMemo(..., [])around lines 77–80 while notifying onpathnamearound lines 85–87.Proposed fix
Use latest-value refs behind stable callbacks, or rebuild/replace the source when relevant options change. Preserve one registration and avoid duplicate navigation history entries.
Acceptance criteria
/firstto/secondresolves/second