mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-27 01:34:25 +08:00
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:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user