fix: silence deprecated lifecycle warning in Transitioner (#118)

I don't feel confident trying to migrate this thing to `getDerivedStateFromProps` so...  `componentWillReceiveProps` -> `UNSAFE_componentWillReceiveProps`
This commit is contained in:
Janic Duplessis
2019-05-09 12:15:05 -04:00
parent ea37fd3139
commit 4b3dc26f8a

View File

@@ -117,7 +117,7 @@ class Transitioner extends React.Component<Props, State> {
this.state.position.removeListener(this.positionListener);
}
componentWillReceiveProps(nextProps: Props) {
UNSAFE_componentWillReceiveProps(nextProps: Props) {
if (this.isTransitionRunning) {
if (!this.queuedTransition) {
this.queuedTransition = { prevProps: this.props };