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, { Component } from 'react'; | |
import { View,Text,Image,StyleSheet } from 'react-native'; | |
import Values from './Values'; | |
class Loader extends Component { | |
state = { } | |
render() { | |
return ( | |
<View style={[{flex:1},Values.styles.centered]}> | |
<Image style={styles.logo} source={require('../assets/images/icon.png')} /> | |
<Text style={[Values.styles.appText,{marginTop:5}]}> |
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'; | |
import appConstants from './AppConstants'; | |
export default values = { | |
styles: StyleSheet.create({ | |
centered: { | |
justifyContent: 'center', | |
alignItems: 'center', | |
}, | |
container: { | |
flex: 1, |
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 { Alert } from 'react-native'; | |
export default class Common { | |
static showAlert(title, message, btns = []) { | |
btns = btns.length == 0 ? [{ text: 'Continuar' }] : btns; | |
Alert.alert(title, message, btns) | |
} | |
} |
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
const appConstants = { | |
APP_URL: 'https://appname.herokuapp.com/',//por lo general es como esta | |
recordOperations:{ | |
CREATE:'create', | |
EDIT:'edit', | |
}, | |
database: { | |
user: { | |
USER_ID: 'user_id', | |
USERS: 'users', |
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 AsyncStorage from '@react-native-community/async-storage'; | |
class AppAsyncStorage { | |
static storeData = async (key, value) => { | |
try { | |
await AsyncStorage.setItem(key, value); | |
} catch (error) { | |
console.log("error storing" + error) | |
} | |
}; |
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 { createStackNavigator } from 'react-navigation-stack'; | |
import { createAppContainer } from 'react-navigation'; | |
import EntryPoint from './UI/EntryPoint'; | |
import appConstants from '../common/AppConstants'; | |
let routes = {} | |
routes[appConstants.appRoutes.ENTRY_POINT] = { screen: EntryPoint } | |
const MainNavigator = createStackNavigator( | |
routes, |
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, View, Text, TouchableOpacity, Linking } from 'react-native'; | |
import Router from './Router'; | |
import Values from '../common/Values' | |
import appConstants from '../common/AppConstants' | |
import Loader from '../common/Loader'; | |
import axios from 'axios'; | |
import AppAsyncStorage from '../common/AppAsyncStorage'; | |
import DeviceInfo from 'react-native-device-info'; | |
const LoadingStatus = [ |
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
const appConstants = { | |
database:{ | |
}, | |
appRoutes: { | |
}, | |
appVersion: { | |
}, |
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'; | |
export default values = { | |
styles: StyleSheet.create({ | |
centered: { | |
justifyContent: 'center', | |
alignItems: 'center', | |
}, | |
container: { | |
flex: 1, | |
}, |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import 'react-native-gesture-handler'; | |
import { NavigationContainer } from '@react-navigation/native'; | |
import React from 'react'; |