Created
July 13, 2018 16:16
-
-
Save joegaudet/f9749381ca6cce762372c47ba8b6da51 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| export default class Main extends Component { | |
| // currentUser stuff is in the state... | |
| render() { | |
| const AppNavigator = createRootNavigator(); | |
| return ( | |
| <SessionContext.Provider value={this.state}> | |
| <AppNavigator persistenceKey="NavigationState" /> | |
| </SessionContext.Provider> | |
| ); | |
| } | |
| } |
This file contains hidden or 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
| export class VehicleTypeScreen extends Component { | |
| static navigationOptions = backNavigation('Vehicle Type'); | |
| render() { | |
| // some stuff | |
| } | |
| static propTypes = { | |
| navigation: PropTypes.object | |
| }; | |
| } | |
| export default function VehicleType(props) { | |
| return ( | |
| <SessionContext.Consumer> | |
| {({currentUser}) => ( | |
| <VehicleTypeScreen | |
| {...props} | |
| currentUser={currentUser} | |
| /> | |
| )} | |
| </SessionContext.Consumer> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment