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 React from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
View, | |
ImageBackground, | |
TouchableOpacity, | |
TextInput | |
} from 'react-native'; | |
import Icon from 'react-native-vector-icons/Feather'; |
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 React from 'react' | |
import { View, TouchableOpacity, Text, StyleSheet } from 'react-native' | |
import Icon from 'react-native-vector-icons/Feather'; | |
const Task = (props) => ( | |
<View style={styles.taskWrapper}> | |
<Icon | |
name="square" | |
size={30} | |
color="#900" | |
style={{ marginLeft: 15 }} |
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 React from 'react' | |
import { View, TouchableOpacity, Text, StyleSheet } from 'react-native' | |
import Icon from 'react-native-vector-icons/Feather'; | |
const Task = (props) => ( | |
<View style={styles.taskWrapper}> | |
<Icon | |
name={props.checked ? "check" : "square"} | |
size={30} | |
color="#900" | |
style={{ marginLeft: 15 }} |
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 {Navigation} from 'react-native-navigation'; | |
import Home from '../screens/Home'; | |
import PushedScreen from '../screens/PushedScreen'; | |
import ModalScreen from '../screens/ModalScreen'; | |
export function registerScreens() { | |
Navigation.registerComponent('HomeScreen', () => Home); | |
Navigation.registerComponent('PushedScreen', () => PushedScreen); | |
Navigation.registerComponent('ModalScreen', () => ModalScreen); | |
} |
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 React from 'react'; | |
import {View, Text, TouchableOpacity} from 'react-native'; | |
import {Navigation} from 'react-native-navigation'; | |
import styles from './styles'; | |
const pushScreen = props => { | |
const {componentId} = props; | |
Navigation.push(componentId, { | |
component: { | |
name: 'PushedScreen', |
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 React from 'react'; | |
import {View, Text, TouchableOpacity} from 'react-native'; | |
import styles from './styles'; | |
const PushedScreen = props => { | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.headerText}>Pushed Screen</Text> | |
<TouchableOpacity style={styles.backButton}> | |
<Text style={styles.backButtonText}>Go Back</Text> |
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 {StyleSheet} from 'react-native'; | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
alignItems: 'center', | |
justifyContent: 'center', | |
backgroundColor: 'skyblue', | |
}, | |
headerText: { |
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
// 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}> |
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 React from 'react'; | |
import {View, Text, TouchableOpacity} from 'react-native'; | |
import {Navigation} from 'react-native-navigation'; | |
import styles from './styles'; | |
const pushScreen = props => { | |
const {componentId} = props; | |
Navigation.push(componentId, { | |
component: { | |
name: 'PushedScreen', |
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
// ModalScreen/index.js | |
import React, {Component} from 'react'; | |
import {View, Text, TouchableOpacity} from 'react-native'; | |
import {Navigation} from 'react-native-navigation'; | |
import styles from './styles'; | |
class ModalScreen extends Component { | |
constructor(props) { | |
super(props); | |
Navigation.events().bindComponent(this); |
OlderNewer