Merge pull request #6 from mikehardy/react-lifecycle-shift
Alter react lifecycle methods to match current deprecation
This commit is contained in:
Коммит
9a5d6dd771
|
@ -243,7 +243,7 @@ class NavigationCardStack extends React.PureComponent<DefaultProps, Props, void>
|
||||||
super(props, context);
|
super(props, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount(): void {
|
UNSAFE_componentWillMount(): void {
|
||||||
this._render = this._render.bind(this);
|
this._render = this._render.bind(this);
|
||||||
this._renderScene = this._renderScene.bind(this);
|
this._renderScene = this._renderScene.bind(this);
|
||||||
this._configureTransition = this._configureTransition.bind(this);
|
this._configureTransition = this._configureTransition.bind(this);
|
||||||
|
|
|
@ -69,7 +69,7 @@ function create(
|
||||||
this._pointerEvents = this._computePointerEvents();
|
this._pointerEvents = this._computePointerEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount(): void {
|
UNSAFE_componentWillMount(): void {
|
||||||
this._onPositionChange = this._onPositionChange.bind(this);
|
this._onPositionChange = this._onPositionChange.bind(this);
|
||||||
this._onComponentRef = this._onComponentRef.bind(this);
|
this._onComponentRef = this._onComponentRef.bind(this);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ function create(
|
||||||
this._positionListener && this._positionListener.remove();
|
this._positionListener && this._positionListener.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps: Props): void {
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void {
|
||||||
this._bindPosition(nextProps);
|
this._bindPosition(nextProps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ class NavigationTransitioner extends React.Component<any, Props, State> {
|
||||||
this._isMounted = false;
|
this._isMounted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount(): void {
|
UNSAFE_componentWillMount(): void {
|
||||||
this._onLayout = this._onLayout.bind(this);
|
this._onLayout = this._onLayout.bind(this);
|
||||||
this._onTransitionEnd = this._onTransitionEnd.bind(this);
|
this._onTransitionEnd = this._onTransitionEnd.bind(this);
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ class NavigationTransitioner extends React.Component<any, Props, State> {
|
||||||
this._isMounted = false;
|
this._isMounted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps: Props): void {
|
UNSAFE_componentWillReceiveProps(nextProps: Props): void {
|
||||||
const nextScenes = NavigationScenesReducer(
|
const nextScenes = NavigationScenesReducer(
|
||||||
this.state.scenes,
|
this.state.scenes,
|
||||||
nextProps.navigationState,
|
nextProps.navigationState,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче