Hello,
My scenes are:
<Scene key="root" hideNavBar={true}>
<Scene key="signPhone" component={SignPhone} initial={true} />
<Scene key="signUp" component={SignUp} />
<Scene key="signIn" component={SignIn} />
<Scene
key="app"
tabs={true}
tabBarStyle={{ height: 60, backgroundColor: '#BE446D' }}
>
<Scene key="profile" navBar={Header} component={SignPhone} title="Minha conta" icon={ProfileIcon} />
<Scene key="appointments" navBar={Header} icon={DesqerIcon} initial={true}>
<Scene key="calendar" component={Calendar} initial={true} />
<Scene key="new" component={New} title="Criar servi莽o" />
</Scene>
</Scene>
</Scene>
Inside my component, i import the Actions from react-native-router-flux:
import { Actions, ActionConst } from 'react-native-router-flux'
But i can't figure how to redirect user to <Scene key="new".../>
I tried to do something like this:
Actions.app_appoitments_new() or Actions.new() and none of them worked.
Thanks.
I've worked around this in the past with the following. If you were navigating from "signIn":
Actions.app()
Actions.appointments()
Actions.new()
If you were already in the app scene you wouldn't need the first one. Not ideal, but it's worked for me.
Great! I just changed new to newAppointment because new is a reserved word in javascript. Thanks!
Most helpful comment
I've worked around this in the past with the following. If you were navigating from "signIn":
If you were already in the app scene you wouldn't need the first one. Not ideal, but it's worked for me.