You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
384 B

// Before
class ExampleComponent extends React.Component {
state = {
isScrollingDown: false,
};
// highlight-range{1-12}
componentWillReceiveProps(nextProps) {
if (
this.props.currentRow !==
nextProps.currentRow
) {
this.setState({
isScrollingDown:
nextProps.currentRow >
this.props.currentRow,
});
}
}
}