Skip to content

Instantly share code, notes, and snippets.

@Yassir4
Created August 1, 2019 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yassir4/dc7e6a088d02fcbe97c422bb23b6eaa5 to your computer and use it in GitHub Desktop.
Save Yassir4/dc7e6a088d02fcbe97c422bb23b6eaa5 to your computer and use it in GitHub Desktop.
// PushedScreen/index.js
import React from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import {Navigation} from 'react-native-navigation';
import styles from './styles';
const goBack = ({componentId}) => Navigation.pop(componentId);
const PushedScreen = props => {
return (
<View style={styles.container}>
<Text style={styles.headerText}>Pushed Screen</Text>
<TouchableOpacity onPress={() => goBack(props)} style={styles.backButton}>
<Text style={styles.backButtonText}>Go Back</Text>
</TouchableOpacity>
</View>
);
};
export default PushedScreen;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment