Push from SingleScreen to TabBased in Wix React Native Navigation

Push from SingleScreen to TabBased in Wix React Native Navigation



There are documentation and examples of navigating from tab view to other single views. But I can't find any information about navigating from a single view to a tab view.



Is there a possibility to this.props.navigator.push to view with tabs somehow?
If not is there are some workarounds to achieve that?


this.props.navigator.push




1 Answer
1



You should do something like this:



Your main stack navigator:


import HomeScreenTabs from '../yourpath/TabNavigator';

const MainStack = createStackNavigator(
HomeScreen:
screen: HomeScreenTabs,
,
SingleViewScreen1:
screen: SomeSingleViewScreen,
navigationOptions: ...
,
SingleViewScreen2:
screen: SomeOtherSingleViewScreen,
navigationOptions: ...
,



Your tab navigator:


//Your 3 tab screens
import Home from '../Home';
import Profile from '../Profile ';
import Feedback from '../Feedback ';

const Tabs = createBottomTabNavigator(

Home:
screen: Home
,
Profile:
screen: Profile
,
Feedback:
screen: Feedback

,

export default Tabs;



And in order to navigate to the Tabs screen from e.g. SingleViewScreen1 you would do this.props.navigation.navigate('HomeScreen').


SingleViewScreen1


this.props.navigation.navigate('HomeScreen')





I'm using a Wix React Native Navigation.
– Roo
Aug 25 at 8:44





Oh. Apologies. Confused with react-navigation :D (btw if you want to give it a try I strongly recommend it, it's really powerful)
– iuliu.net
Aug 25 at 8:50


react-navigation





I think I'll have to because I can't do such a simple thing with a Wix navigation.
– Roo
Aug 25 at 9:05





You'll thank yourself in the future. react-navigation is the way to go. And is also the preffered navigation system chosen by Expo, so you know it's good. :D
– iuliu.net
Aug 25 at 9:11





@iuliu.net react-navigation is NOT a native navigation system like Wix navigation. There is a big performance step-up when using a native navigation system like Wix. Native navigation runs on UI thread unlike react-navigation which runs on JS thread. It really has everything react-navigation has, it just has a slightly different API.
– Christos Lytras
Aug 30 at 22:36






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)