Upgrade to Flow 0.71
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// @flow
|
||||
// based on: https://reacttraining.com/react-router/web/guides/scroll-restoration
|
||||
import { Component } from 'react';
|
||||
import * as React from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
class ScrollToTop extends Component {
|
||||
class ScrollToTop extends React.Component<*> {
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.location !== prevProps.location) {
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
Reference in New Issue
Block a user