Created
December 2, 2016 16:38
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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