Skip to content

Instantly share code, notes, and snippets.

@richardgill
Created December 2, 2016 16:38
Show Gist options
  • Save richardgill/2346642cb47622b4e7207ff4066d8a7d to your computer and use it in GitHub Desktop.
Save richardgill/2346642cb47622b4e7207ff4066d8a7d to your computer and use it in GitHub Desktop.
How to define all your routes in one place to avoid things getting messy
import { Navigator } from 'react-native'
export default {
component1: (order = null) => ({
component: require('./components/component1').default,
}),
component2: (prop1) => ({
component: require('./components/component2').default,
passProps: { prop1: prop1 },
sceneConfig: Navigator.SceneConfigs.FloatFromRight,
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment