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
1. Creación proyecto | |
a. npx react-native init MiAppCuquita | |
b. sdk.dir = C:\\Users\\.....\\Android\\Sdk | |
c. npx react-native run-android | |
2. Instalamos dependencias ejecutamos | |
yarn add @react-native-community/async-storage@react-native-community/async-storage axios native-base formik react-native-device-info react-native-easy-toast react-native-gesture-handler react-native-reanimated react-native-screens react-navigation react-navigation-stack react-navigation-tabs yup | |
npm i react-native-unimodules expo-secure-store |
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 React, { Component } from 'react'; | |
import { View, Text, StyleSheet } from 'react-native'; | |
import { Card, CardItem, Button, Item, Label, Input } from 'native-base'; | |
import AppAsyncStorage from '../common/AppAsyncStorage'; | |
class AddACard extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
cardValue: '', | |
cards: [] |
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, StyleSheet } from 'react-native'; | |
import { Card, CardItem, Button, Item, Label, Input } from 'native-base'; | |
import AppAsyncStorage from '../common/AppAsyncStorage'; | |
class AddACard extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
cardValue: '', | |
cards: [] |
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
var mongoose = require('mongoose') | |
//nuevoooooooooooo | |
//connection to Mongo | |
const url = 'mongodb://localhost:27017/tarjetapp' | |
mongoose.connect(url, {useNewUrlParser: true}) | |
.then(db => console.log(' DB connected')) | |
.catch(err => console.log(err.message)) | |
//con |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.slim.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/umd/popper.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script> | |
</body> | |
</html> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css"> | |
<link rel="stylesheet" href="stylesheets/style.css"> |
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
<% include ../layout/head %> | |
<% let selected= (string)=>{ | |
return category.icon_type==string | |
} %> | |
<div class="container"> | |
<div class="row"> | |
<!-- FORM --> | |
<div class="col-md-4 offset-md-3"> | |
<h2>Crear Categoría</h2> | |
<div class="card"> |
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
<% include ../layout/head %> | |
<%if(query.created=="true"){%> | |
<div id="successAlert" class="alert alert-success">¡Super! Se creó la Categoría</div> | |
<script> | |
setTimeout(() => { | |
document.getElementById("successAlert").style.display = 'none' | |
}, 2000) | |
</script> | |
<%}%> | |
<%if(query.deleted=="true"){%> |