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
'use strict' | |
// 0.- Nuestro primer componente | |
class Hola extends React.Component { | |
// 5.- A帽adimos la propiedad state | |
state = { | |
emoticono: '馃槑' | |
} | |
// 6.- M茅todo donde utilizamos la funcion `setState` | |
cambiarEmoticono() { | |
let emoticono = '馃ぉ' |
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
'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 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
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 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
class Hola { | |
render() { | |
return <h1>隆Hola {this.props.mundo}!</h1>; | |
} | |
} |
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
<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 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
'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 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
//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 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
//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 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
<!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 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
# 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: |