You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After clicking the Next.js page button and returning, the previously set history state becomes undefined.
Describe the Bug
The history state that was stored in previous page become undefined when navigating backward. The reason is HistoryUpdater component. The component overwrite the history state.
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 Binaries: Node: 20.5.0 npm: 9.8.0 Yarn: 1.22.19 pnpm: 8.6.12 Relevant Packages: next: 13.4.13 eslint-config-next: 11.0.1 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
https://github.com/khsiea/reproduction-app
To Reproduce
After clicking the
Next.js page
button and returning, the previously set history state becomesundefined
.Describe the Bug
The history state that was stored in previous page become
undefined
when navigating backward. The reason isHistoryUpdater
component. The component overwrite the history state.next.js/packages/next/src/client/components/app-router.tsx
Lines 110 to 132 in 4d6febf
Expected Behavior
I want to use another history state value.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: