react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[v2] how to navigate to new component screen from sideMenu ??

Open NweThazin opened this issue 8 years ago • 3 comments

Issue Description

Navigation.registerComponent("menu.screenScreen", () => SecondScreen);

sideMenu: { center: bottomtabs:{....} right: { component: { id: "componentId", name: "menu.firstScreen", } } }

how to navigate to SecondScreen Component from firstScreen of Sidemenu??

(https://github.com/wix/react-native-navigation/issues/197)]

Environment

React Native Navigation version:"^2.0.2556" React Native version: "0.55.4" Platform(s) (iOS, Android, or both?): both Device info (Simulator/Device? OS version? Debug/Release?): all

NweThazin avatar Oct 27 '18 14:10 NweThazin

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

support avatar Oct 28 '18 05:10 support

@NweThazin, did you figure this out?

alexsmartens avatar Nov 04 '18 23:11 alexsmartens

@alexsmartens @NweThazin , please use stack in center, and use bottomtabs as a child of this stack.

Navigation.registerComponent("menu.screenScreen", () => SecondScreen);

sideMenu: {
 center: {
   stack:{
    id: 'CENTER_STACK',
    children: [
     { 
      bottomTabs:{....}
     },
    ],
  },
 },
 right: {
   component: {
    id: "componentId",
    name: "menu.firstScreen",
   },
 },
}

then you can pushScreen('CENTER_STACK', 'menu.secondScreen') in sidemenu. CENTER_STACK is the component id of the stack where bottomtabs live.

stevesuyao avatar Dec 13 '18 04:12 stevesuyao