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
| interface Props { | |
| navigation: NavigationScreenProp<any, any>; | |
| } | |
| class Home extends React.Component<Props> { | |
| render() { | |
| return ( | |
| <View style={{ flex: 1, justifyContent: "space-around", alignItems: "center" }}> | |
| <Text style={{ fontSize: 48, fontWeight: "bold" }}>Home Screen</Text> | |
| <Button title="Profile" onPress={() => this.props.navigation.navigate("Profile")} /> |
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
| const stack = createStackNavigator({ | |
| Home, | |
| Settings, | |
| Profile | |
| }) |
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
| const transitioner = (): TransitionConfig => { | |
| return { | |
| transitionSpec: { | |
| duration: 400 | |
| }, | |
| screenInterpolator: (transitionProps: NavigationTransitionProps) => { | |
| const { position, scene } = transitionProps; | |
| const index = scene.index; | |
| } | |
| } |
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 createStackNavigator({ | |
| Home, | |
| Settings, | |
| Profile | |
| }, { | |
| transitionConfig: transitioner | |
| }) |
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
| const prevGetStateForAction = myStack.router.getStateForAction; | |
| myStack.router.getStateForAction = (action , state) => { | |
| if (state && action.type === "Navigation/NAVIGATE") { | |
| // do stuff | |
| } | |
| return prevGetStateForAction(action, state); | |
| }; |
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
| const prevGetStateForAction = myStack.router.getStateForAction; | |
| myStack.router.getStateForAction = (action, state) => { | |
| if (state && action.type === "Navigation/NAVIGATE") { | |
| let routes = state.routes; | |
| const lastScene: NavigationRoute = routes.slice(-1)[0]; | |
| const lastSceneName = lastScene.routeName; | |
| routes = routes.filter((item: NavigationRoute, index: number) => item.routeName !== lastSceneName); | |
| routes.push(lastScene); |
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
| const prevGetStateForAction = myStack.router.getStateForAction; | |
| myStack.router.getStateForAction = (action, state) => { | |
| if (state && action.type === "Navigation/COMPLETE_TRANSITION") { | |
| let routes = state.routes; | |
| if (routes.length === 1) { | |
| return { | |
| ...state, | |
| index: 0, | |
| }; |
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
| interface Props { | |
| navigation: NavigationScreenProp<any, any>; | |
| } | |
| class Home extends React.Component<Props> { | |
| render() { | |
| return ( | |
| <View style={{ flex: 1, justifyContent: "space-around", alignItems: "center" }}> | |
| <Text style={{ fontSize: 48, fontWeight: "bold" }}>Home Screen</Text> | |
| <Button title="Profile" onPress={() => this.props.navigation.push("Profile")} /> |
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
| // view current remote | |
| git remote -v | |
| // update origin | |
| git remote set-url origin https://hostname/USERNAME/REPOSITORY.git |
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
| { | |
| "1und1": { | |
| "host": "smtp.1und1.de", | |
| "port": 465, | |
| "secure": true, | |
| "authMethod": "LOGIN" | |
| }, | |
| "AOL": { | |
| "domains": [ |
OlderNewer