File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,9 @@ const ScrollableTabBar = createReactClass({
193
193
</ View > ;
194
194
} ,
195
195
196
- componentWillReceiveProps ( nextProps ) {
196
+ componentDidUpdate ( prevProps ) {
197
197
// If the tabs change, force the width of the tabs container to be recalculated
198
- if ( JSON . stringify ( this . props . tabs ) !== JSON . stringify ( nextProps . tabs ) && this . state . _containerWidth ) {
198
+ if ( JSON . stringify ( prevProps . tabs ) !== JSON . stringify ( this . props . tabs ) && this . state . _containerWidth ) {
199
199
this . setState ( { _containerWidth : null , } ) ;
200
200
}
201
201
} ,
Original file line number Diff line number Diff line change @@ -107,13 +107,13 @@ const ScrollableTabView = createReactClass({
107
107
} ;
108
108
} ,
109
109
110
- componentWillReceiveProps ( props ) {
111
- if ( props . children !== this . props . children ) {
112
- this . updateSceneKeys ( { page : this . state . currentPage , children : props . children , } ) ;
110
+ componentDidUpdate ( prevProps ) {
111
+ if ( this . props . children !== prevProps . children ) {
112
+ this . updateSceneKeys ( { page : this . state . currentPage , children : this . props . children , } ) ;
113
113
}
114
114
115
- if ( props . page >= 0 && props . page !== this . state . currentPage ) {
116
- this . goToPage ( props . page ) ;
115
+ if ( this . props . page >= 0 && this . props . page !== this . state . currentPage ) {
116
+ this . goToPage ( this . props . page ) ;
117
117
}
118
118
} ,
119
119
You can’t perform that action at this time.
0 commit comments