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 } from 'react-native'; | |
import { Card, CardItem, Button, Item, Label, Input } from 'native-base'; | |
class AddACard extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
cardValue: '',//<--- Nuevo | |
cards: [] //<--- Nuevo | |
} |
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 } from 'react-native'; | |
import { Card, CardItem, Button, Item, Label, Input } from 'native-base'; | |
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 } from 'react-native'; | |
class Training extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { } | |
} | |
render() { | |
return ( <View> |
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, createAppContainer } from "react-navigation"; | |
import AddACard from "./src/components/UI/AddACard"; | |
import Training from "./src/components/UI/Training"; | |
const AppNavigator = createStackNavigator({ | |
AddACard: { | |
screen: AddACard | |
}, | |
Training :{ | |
screen:Training |
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 } from 'react-native'; | |
import Router from './Router';//<-- se añade esta importación | |
export default function App() { | |
return ( | |
<Router/> //<se llama el Router | |
); | |
} |
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 } from 'react-native'; | |
import { Card, CardItem, Button, Item, Label, Input } from 'native-base'; | |
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 } from 'react-native'; | |
import { Card, CardItem, Button, Item, Label, Input } from 'native-base'; | |
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 } from 'react-native'; | |
import { Card, CardItem, Button } from 'native-base'; | |
class Training extends Component { | |
//nuevo | |
static navigationOptions = ({ navigation }) => { | |
return { | |
title: 'Repaso' | |
} |
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 mongoose = require('mongoose') | |
const Schema = mongoose.Schema; | |
const categorySchema=new Schema({ | |
name: String, | |
icon: { | |
name: String, | |
type: String | |
} | |
}) |
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 express = require('express'); | |
var router = express.Router(); | |
const Category = require('../models/category') | |
//index and form to create | |
router.get('/', async function (req, res, next) { | |
console.log('index') | |
categories = await Category.find(); | |
res.render('categories/index', { title: 'Tarjeta APP', categories: categories , query:req.query }); | |
}); | |
//create |