reactjs - How to link 'from outside' into Navigator (for example from a global footer) -
with react navigation, there way link from outside specific path/screen inside navigator?
for example implement global footer, this:
<provider store={store}>   <view>      <appnavigator />      <myfooter /> // link here path/screen inside appnavigator   </view> </provider>      
i think refs might work here. if want use navigator same level declare can use react's refs , pass props myfooter. @ example in official documentation. 
const appnavigator = stacknavigator(someapprouteconfigs);  class app extends react.component {   somefunction = () => {     // call navigate appnavigator here:     this.navigator && this.navigator.dispatch({ type: 'navigate', routename, params });   }   render() {     return (       <view>         <appnavigator ref={nav => { this.navigator = nav; }} />         <myfooter somefunction={this.somefunction} />       </view>     );   } }      
Comments
Post a Comment