router icon indicating copy to clipboard operation
router copied to clipboard

Browser history navigation broken

Open mer10z opened this issue 3 years ago • 3 comments

Describe the bug

In 0.0.1-beta.198, browser navigating backwards and forwards changes the URL but does not update the page. It looks like this was introduced with the recent history changes. Beta 193 is the most recent version that is not broken.

Your Example Website or App

tanstack-router-react-example-with-loaders-kitchen-sink-code-split

Steps to Reproduce the Bug or Issue

  1. Run tanstack-router-react-example-with-loaders-kitchen-sink-code-split locally (not sure how to navigate in stackblitz)
  2. Go to a few different routes
  3. Try to navigate back and forward
  4. URL changes but page content does not

Expected behavior

Navigating back or forward updates page with proper route content

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 118.0.5993.88

Additional context

No response

mer10z avatar Oct 31 '23 19:10 mer10z

+1

plbstl avatar Nov 01 '23 07:11 plbstl

I am thinking history.update is meant to be called in lines 289 and 293 of the history package.

https://github.com/TanStack/router/blob/3a32a8fc3a00834106ed2142c0acccc42ad67379/packages/history/src/index.ts#L287-L294

plbstl avatar Nov 01 '23 07:11 plbstl

Looks like this is fixed in beta 204

mer10z avatar Nov 02 '23 23:11 mer10z