3

My problem is sending param to Child Scene in React Native Router Flux.

This is my Router.js :

<Router>
      <Stack key="root" hideNavBar>
      <Scene key='anotherScreen' component={anotherScreen}  initial> </Scene>
      <Drawer key= 'DrawerMenu' contentComponent={DrawerScreen}  drawerWidth={250} drawerPosition='left'>  

      <Scene key= 'tabBar' tabs 
      activeBackgroundColor='orange'
      activeTintColor= 'purple'
      inactiveBackgroundColor='grey'> 

      <Scene key= 'Home' title='Home'> 
      <Scene key='HomeScreen' title='HomeScreen' component={HomeScreen} ></Scene>
      </Scene> 

      <Scene key= 'One' title='One'> 
      <Scene key='ScreenOne' title='One' component={ScreenOne} ></Scene>
      </Scene> 

      <Scene key= 'Two' title='Two'> 
      <Scene key='ScreenTwo' title='ScreenTwo' component={ScreenTwo} ></Scene>
      </Scene>   

      </Scene>  
      </Drawer>

      </Stack>
    </Router>

So, as you see there is one Scene which name is "anotherScreen" and other parent scene "tabBar" which includes 3 child scenes.

I want to send params from "anotherScreen" to child scene of "tabBar", for example "HomeScreen". But I cannot reach "HomeScreen" with Actions function. So, I cannot send my params to it. I can only reach parent Scene that is "Home".

I know I cannot route "anotherScreen" to "HomeScreen", I can only route to "Home" but then how can I send my params to it ?

cezager
  • 81
  • 5

0 Answers0