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
'use strict' | |
// 0.- Nuestro primer componente | |
class Hola extends React.Component { | |
// 5.- Añadimos la propiedad state | |
state = { | |
emoticono: '😎' | |
} | |
render() { | |
// 2.- mostrar la propiedad `quien` | |
return <h1>¡Hola {this.props.quien} {this.state.emoticono}!</h1>; |
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
class Presidentes extends React.Component { | |
presidentes = [ | |
{ nombre: "Rajoy", status: "funcionario" }, | |
{ nombre: "Felipe González", status: "retirado" }, | |
{ nombre: "Aznar", status: "retirado" }, | |
{ nombre: "Pedro Sanchez", status: "presidente" }, | |
] | |
render() { | |
return this.presidentes | |
.filter(p => "presidente" !== p.status) |
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
class Hola { | |
render() { | |
return <h1>¡Hola {this.props.mundo}!</h1>; | |
} | |
} |
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
<a href="https://sejas.es" target="_blank"><strong>FullStack & Mobile Remote Developer</strong></a>, Ingeniero Superior en Informática (UPM), Mongo Developer Certified (MongoDB University) y mentor de <a href="https://reactjs.org/" target="_blank"><strong>React</strong></a> de los estudiantes de Udacity. | |
Con más de 10 años de experiencia, he desarrollado software para grandes marcas como Telefónica, BlackBerry, Randstad, General Electric, Udacity y Pernod Ricard. | |
Apasionado de la educación, me encanta aprender y compartir conocimientos a través del <a href="https://github.es" target="_blank"><strong>open source</strong></a>. |
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
'use strict' | |
// 0.- Nuestro primer componente | |
class Hola extends React.Component { | |
render() { | |
// 2.- mostrar la propiedad `quien` | |
return <h1>¡Hola {this.props.quien}!</h1>; | |
} | |
} | |
// 4.- Definimos un componente que renderiza otro componente | |
class App extends React.Component { |
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
//https://github.com/reactspain/curso-introduccion-react/blob/03-props/index.jsx | |
'use strict' | |
// 0.- Nuestro primer componente | |
class Hola extends React.Component { | |
render() { | |
// 2.- mostrar la propiedad `quien` | |
return <h1>¡Hola {this.props.quien}!</h1>; | |
} | |
} | |
// 1.- Renderizar nuestra App |
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
//https://github.com/reactspain/curso-introduccion-react/blob/02-primer-componente/index.jsx | |
'use strict' | |
// 0.- Nuestro primer componente | |
class Hola extends React.Component { | |
render() { | |
return <h1>¡Hola Mundo!</h1>; | |
} | |
} | |
// 1.- Renderizar nuestra App | |
ReactDOM.render( |
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> | |
<!-- https://github.com/reactspain/curso-introduccion-react/blob/01-scripts-div-root/index.html --> | |
<html lang="es"> | |
<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"> | |
<title>Mi primera aplicación de React by JSSchool</title> | |
<!-- Scripts --> | |
<!-- 0.- Librería React --> |
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
# Author: https://sejas.es | |
# Github Firbase deploy CI | |
# - / | |
# - /.circleci/config.yml : It is this file | |
# - /react-folder : it has the react project | |
# - /react-folder/build : the compiled code will be saved here | |
# - /firebase : it has the folders to deploy to firebase | |
# - /firebase/public : the content of this folder will be deployed to firebase. | |
# CI will compile the react project, then it will copy the files from build to public and it will deploy to firebase using the token that we got running `firebase login:ci` in our local machines. | |
# Don't forget to add the variable $FIREBASE_TOKEN into the Environment Variables: |
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
MIT License | |
Copyright (c) 2018 Antonio Sejas. https://sejas.es | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |