Simple ReactJS component that will scroll to top upon load
npm install --save scroll-to-top-onload
import React, { Component } from 'react'
import MyComponent from 'scroll-to-top-onload'
import 'scroll-to-top-onload/dist/index.css'
class Example extends Component {
render() {
return <MyComponent />
}
}
MIT © ptcayetano