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
import React from 'react'; | |
import { createAppContainer } from 'react-navigation'; | |
import { NavigationContainer } from "@react-navigation/native"; | |
import { createStackNavigator } from '@react-navigation/stack'; | |
import ColorScreen from './src/screens/ColorScreen'; | |
import ComponentsScreen from './src/screens/ComponentsScreen'; | |
import CounterScreen from './src/screens/CounterScreen'; | |
import HomeScreen from './src/screens/HomeScreen'; | |
import ImageScreen from './src/screens/ImageScreen'; |
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
import React, { useReducer } from 'react'; | |
import { Text, View, StyleSheet } from 'react-native'; | |
import ColorCounter from '../components/ColorCounter'; | |
const COLOR_INCREMENT = 15; | |
const reducer = (state, action) => { | |
//state === {red: number, green: number, blue: number} | |
//action === {colorToChange: red || green || blue, amount: 15 || -15} |
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
//calling module | |
import { setTab } from "../../../shared/store/actions/navAction"; | |
<Tab | |
label={translate.tabAll} | |
selected={tab === 1} | |
onPress={() => { | |
setTab(1); //no console response when selected | |
}} | |
/> |
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
import React from 'react'; | |
import {View, Text, StyleSheet, Button, Alert} from 'react-native'; | |
import Realm from 'realm'; | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
}, | |
welcome: { |
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
/* | |
@module /components/AddReservation | |
@description Allow a user to book a reservation | |
List all props here ------- | |
@param description | |
@param title | |
--------------------------- | |
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
import React, { Component } from 'react' | |
import AppNavigator from './AppNavigator' | |
import { ApolloProvider, graphql } from 'react-apollo' | |
import { ApolloClient, HttpLink, InMemoryCache } from 'apollo-boost' | |
const client = new ApolloClient({ | |
link: new HttpLink({ | |
uri: | |
'https://your-graphql-endpoint' | |
}), |