javascript - React Native Router (react-native-router-flux) - more control in action triggering -


we using react native router manage navigation. render function of our router looks this:

<scene key="tabbar" tabs={true} hidenavbar={true} tabbarstyle={{position: 'absolute', top: 0, left: 0}}>     <scene key={tab_1} component={tab1container} icon={tabicon} title={tab_1_title} hidenavbar={true} />     <scene key={tab_2}  component={tab2container} icon={tabicon} title={tab_2_title} hidenavbar={true} />     <scene key={tab_3}  component={tab3container} icon={tabicon} title={tab_3_title}  hidenavbar={true} />     <scene key={tab_4} component={tab4container} icon={tabicon} title={tab_4_title}  hidenavbar={true} />     <scene key={tab_5} component={tab5container} icon={tabicon} title={tab_5_title}  hidenavbar={true} /> </scene> 

in our app it's not allowed jump tab_1 tab_5 immediately. have go through tab_2 tab_5. when can jump beginning end

now can't find possibility have function triggered before action fired.

pseudocode:

if(current_pressed_tab <= progress_tab){   //head on next tab } else{   //make nothing } 

is there functionality or callback-prop can use?

you need keep track of routes you've navigated in redux (i presume) , create custom redux action creators run checking pseudo code before triggering navigation.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -