Skip to content

An example React app started from create-react-app that illustrates how you can create a route that restores scroll on route change with react-router v4.

Notifications You must be signed in to change notification settings

rizedr/react-router-scroll-top

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo to support an answer for this question on stackoverflow.

A good explanation of the code can be found in the answer.

Setup

It's a create-react-app, so for more details check that out.

To run it, do this steps:

  1. npm install
  2. npm run start

The app will run on port 3000.

About

An example React app started from create-react-app that illustrates how you can create a route that restores scroll on route change with react-router v4.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published