Skip to content

Instantly share code, notes, and snippets.

@lucianomlima
Created February 23, 2017 21:48
Show Gist options
  • Save lucianomlima/96aa3af25cf332e38c0a9ed272c29698 to your computer and use it in GitHub Desktop.
Save lucianomlima/96aa3af25cf332e38c0a9ed272c29698 to your computer and use it in GitHub Desktop.
React Native Scenes example
import React from 'react';
import { Actions, Modal, Scene } from 'react-native-router-flux';
module.exports = Actions.create(
<Scene key={'modal'} component={Modal}>
<Scene
key={'root'}
leftButtonIconStyle={styles.navBarButtonIcon}>
<Scene key={'drawer'} component={NavigationDrawer} open={false}>
<Scene
drawerIcon={drawerIcon}
key={'drawerChildrenWrapper'}
backButtonTextStyle={styles.navBarButtonText}
leftButtonIconStyle={styles.navBarButtonIcon}>
<Scene initial
component={Home}
key={'home'}
title={'Onde está meu trio'}
type={ActionConst.REPLACE} />
<Scene
component={Radar}
key={'radarCircuitos'}
title={'Onde está meu trio'}
type={ActionConst.REPLACE} />
<Scene
component={Trios}
key={'radarTrios'}
title={'Escolha o Trio'} />
<Scene
component={Localizacao}
key={'radarLocalizacao'}
renderRightButton={updateButton} />
<Scene
component={Circuitos}
key={'programacaoCircuitos'}
title={'Programação'}
type={ActionConst.REPLACE} />
<Scene
component={Dias}
key={'programacaoDias'}
title={'Programação'} />
<Scene
component={Programacao}
key={'programacaoTabela'} />
<Scene
component={Carnaval360}
key={'carnaval360'}
title={'Carnaval 360°'}
type={ActionConst.REPLACE} />
<Scene
component={FitDance}
key={'fitdance'}
title={'Coreografias'}
type={ActionConst.REPLACE} />
<Scene
navigationBarStyle={{backgroundColor: '#4caf50'}}
component={ListaNoticias}
key={'noticias'}
title={'Notícias'}
type={ActionConst.REPLACE} />
<Scene
navigationBarStyle={{backgroundColor: '#4caf50'}}
component={SingleNoticia}
key={'singleNoticia'}
title={'Notícias'} />
<Scene
navigationBarStyle={{backgroundColor: '#50A9FF'}}
component={Telefones}
key={'telefones'}
title={'Telefones úteis'}
type={ActionConst.REPLACE} />
<Scene
component={Selfie}
key={'selfie'}
title={'Você no Carnaval'}
type={ActionConst.REPLACE} />
<Scene
component={Capture}
key={'capture'}
backTitle={'Voltar'}
title={'Tirar Foto'}
duration={1} />
<Scene
component={Preview}
key={'preview'}
backTitle={'Cancelar'}
title={'Escolha sua moldura'}
duration={1} />
<Scene
component={Sobre}
key={'sobre'}
title={'Sobre o aplicativo'}
type={ActionConst.REPLACE} />
</Scene>
</Scene>
<Scene
key={'login'}
component={Login}
title={'Login'} />
<Scene
key={'forgetPassword'}
component={ForgetPassword}
title={'Esqueci minha senha'} />
<Scene
key={'signup'}
component={Signup}
title="Cadastro" />
<Scene
component={ChangePassword}
key={'changePassword'}
title={'Trocar senha'} />
<Scene
component={Video}
key={'video'} />
</Scene>
<Scene
component={Overlay}
key={'overlay'}/>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment