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({
193193 </ View > ;
194194 } ,
195195
196- componentWillReceiveProps ( nextProps ) {
196+ componentDidUpdate ( prevProps ) {
197197 // 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 ) {
199199 this . setState ( { _containerWidth : null , } ) ;
200200 }
201201 } ,
Original file line number Diff line number Diff line change @@ -107,13 +107,13 @@ const ScrollableTabView = createReactClass({
107107 } ;
108108 } ,
109109
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 , } ) ;
113113 }
114114
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 ) ;
117117 }
118118 } ,
119119
You can’t perform that action at this time.
0 commit comments