Skip to content
Source
Sign inSign up
TanStack/router

examples/react/scroll-restoration

lint
History
Contents of examples/react/scroll-restoration
NameLast commit messageLast commit date
..
.vscode (directory)
src (directory)
.gitignore
index.html
package.json
README.md
tsconfig.json
vite.config.js

README.md

TanStack Router - Scroll Restoration Example

An example demonstrating scroll position restoration.

Start a new project based on this example

To start a new project based on this example, run:

npx gitpick TanStack/router/tree/main/examples/react/scroll-restoration scroll-restoration

Getting Started

Install dependencies:

pnpm install

Start the development server:

pnpm dev

Build

Build for production:

pnpm build

About This Example

This example demonstrates:

  • Scroll position restoration
  • Browser back/forward scroll behavior
  • Custom scroll restoration logic
  • User experience optimization