0.0.2 • Published 5 years ago

@fiveem/react-scroll-to-top v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

React Scroll To Top

npm (scoped)

The component scroll to top on route change

Install

npm i @fiveem/react-scroll-to-top

Usage

import ScrollToTop from '@fiveem/react-scroll-to-top'

<Router>
    <ScrollToTop>
        <Switch>
            <Route exact path="/" component={FirstComponent}/>
            <Route exact path="/path" component={SecondComponent} />
        </Switch>
        <ModalSection />
    </ScrollToTop>
</Router>

The component must be rendered inside a Router element.

0.0.2

5 years ago

0.0.1

5 years ago