├── Lecture 1 Plain JS Component ├── 1 - Start │ └── index.html └── 2 - End │ └── index.html ├── Lecture 10 ES6 StateLess Functional Components Challenge ├── 1 - Start │ ├── index.html │ └── lesson10styling.css └── 2 - End │ ├── index.html │ └── lesson10styling.css ├── Lecture 10 ES6 StateLess Functional Components ├── 1 - Start │ ├── index.html │ └── lesson10styling.css └── 2 - End │ ├── index.html │ └── lesson10styling.css ├── Lecture 11 Higher Order Components ├── 1 - Start │ ├── index.html │ └── lesson11styling.css └── 2 - End │ ├── index.html │ └── lesson11styling.css ├── Lecture 12 Webpack setup ├── .babelrc ├── index.html ├── package.json ├── src │ ├── components │ │ └── babel-transformer.jsx │ └── index.jsx ├── style │ └── style.css └── webpack.config.js ├── Lecture 13 JSX Transformer ├── bundle.js ├── index.html ├── package.json ├── src │ ├── components │ │ └── babel-transformer.jsx │ └── index.jsx ├── style │ └── style.css └── webpack.config.js ├── Lecture 14 PokeDashboard Making API Calls ├── README.md ├── favicon.ico ├── index.html ├── package.json └── src │ ├── App.css │ ├── App.js │ ├── index.css │ ├── index.js │ └── logo.svg ├── Lecture 15 PokeDashboard PokeList ├── README.md ├── favicon.ico ├── index.html ├── package.json └── src │ ├── App.css │ ├── App.js │ ├── components │ └── PokeList.js │ ├── index.css │ ├── index.js │ └── logo.svg ├── Lecture 16 PokeDashboard Pagination ├── README.md ├── favicon.ico ├── index.html ├── package.json └── src │ ├── App.css │ ├── App.js │ ├── components │ └── PokeList.js │ ├── index.css │ ├── index.js │ └── logo.svg ├── Lecture 17 PokeDashboard Items Per Page ├── README.md ├── favicon.ico ├── index.html ├── package.json └── src │ ├── App.css │ ├── App.js │ ├── components │ ├── PokeList.js │ └── SelectItemsPerPageButtons.js │ ├── index.css │ ├── index.js │ └── logo.svg ├── Lecture 18 Refactor & PokemonIndexList ├── README.md ├── favicon.ico ├── index.html ├── package.json └── src │ ├── App.css │ ├── App.js │ ├── components │ ├── PaginationContainer.js │ ├── PokeList.js │ ├── PokemonIndexList.js │ └── SelectItemsPerPageButtons.js │ ├── index.css │ ├── index.js │ └── logo.svg ├── Lecture 2 JSX Component ├── 1 - Start │ └── index.html └── 2 - End │ └── index.html ├── Lecture 3 CreateClass ├── 1 - Start │ └── index.html └── 2 - End │ └── index.html ├── Lecture 4 Props ├── 1 - Start │ └── index.html └── 2 - End │ └── index.html ├── Lecture 4-1 Aside - The let keyword ├── 1 - Start │ └── index.html └── 2 - End │ └── index.html ├── Lecture 5 State Challenge Refactor 1 ├── 1 - Start │ ├── index.html │ └── lesson5challengestyling.css └── 2 - End │ ├── index.html │ └── lesson5challengestyling.css ├── Lecture 5 State Challenge Refactor 2 ├── 1 - Start │ ├── index.html │ └── lesson5challengestyling.css └── 2 - End │ ├── index.html │ └── lesson5challengestyling.css ├── Lecture 5 State Challenge ├── 1 - Start │ ├── index.html │ └── lesson5challengestyling.css └── 2 - End │ ├── index.html │ └── lesson5challengestyling.css ├── Lecture 5 State ├── 1 - Start │ └── index.html └── 2 - End │ └── index.html ├── Lecture 6 Stateless Functional Components ├── 1 - Start │ └── index.html └── 2 - End │ └── index.html ├── Lecture 7 Lifecycle Components ├── Part 1 │ ├── 1 - Start │ │ └── index.html │ └── 2 - End │ │ └── index.html └── Part 2 │ ├── 1 - Start │ └── index.html │ └── 2 - End │ ├── index.html │ └── lesson7challengestyling.css ├── Lecture 8 Lifecycle component updates ├── 1 - Start │ ├── index.html │ └── lesson8styling.css └── 2 - End │ ├── index.html │ └── lesson8styling.css └── Lecture 9 ES6 Classes ├── 1 - Start └── index.html └── 2 - End └── index.html /Lecture 1 Plain JS Component/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 |
11 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Lecture 1 Plain JS Component/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 |
11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components Challenge/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components Challenge/1 - Start/lesson10styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | 14 | .container .btn { 15 | border: 0; 16 | padding: 15px; 17 | margin: 10px; 18 | width: 20%; 19 | font-size: 15px; 20 | outline: none; 21 | border-radius: 3px; 22 | color: #FFF; 23 | font-weight: bold; 24 | } 25 | 26 | .btn.blue-btn { 27 | background-color: #55acee; 28 | box-shadow: 0px 5px 0px 0px #3C93D5; 29 | } 30 | 31 | .btn.blue-btn:hover { 32 | background-color: #6FC6FF; 33 | } 34 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components Challenge/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components Challenge/2 - End/lesson10styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | 14 | .container .btn { 15 | border: 0; 16 | padding: 15px; 17 | margin: 10px; 18 | width: 20%; 19 | font-size: 15px; 20 | outline: none; 21 | border-radius: 3px; 22 | color: #FFF; 23 | font-weight: bold; 24 | } 25 | 26 | .btn.blue-btn { 27 | background-color: #55acee; 28 | box-shadow: 0px 5px 0px 0px #3C93D5; 29 | } 30 | 31 | .btn.blue-btn:hover { 32 | background-color: #6FC6FF; 33 | } 34 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components/1 - Start/lesson10styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | 14 | .container .btn { 15 | border: 0; 16 | padding: 15px; 17 | margin: 10px; 18 | width: 20%; 19 | font-size: 15px; 20 | outline: none; 21 | border-radius: 3px; 22 | color: #FFF; 23 | font-weight: bold; 24 | } 25 | 26 | .btn.blue-btn { 27 | background-color: #55acee; 28 | box-shadow: 0px 5px 0px 0px #3C93D5; 29 | } 30 | 31 | .btn.blue-btn:hover { 32 | background-color: #6FC6FF; 33 | } 34 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Lecture 10 ES6 StateLess Functional Components/2 - End/lesson10styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | 14 | .container .btn { 15 | border: 0; 16 | padding: 15px; 17 | margin: 10px; 18 | width: 20%; 19 | font-size: 15px; 20 | outline: none; 21 | border-radius: 3px; 22 | color: #FFF; 23 | font-weight: bold; 24 | } 25 | 26 | .btn.blue-btn { 27 | background-color: #55acee; 28 | box-shadow: 0px 5px 0px 0px #3C93D5; 29 | } 30 | 31 | .btn.blue-btn:hover { 32 | background-color: #6FC6FF; 33 | } 34 | -------------------------------------------------------------------------------- /Lecture 11 Higher Order Components/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Lecture 11 Higher Order Components/1 - Start/lesson11styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | 14 | .container label { 15 | margin: 0; 16 | padding: 20px; 17 | font-size: 36px; 18 | } 19 | 20 | .container .btn { 21 | border: 0; 22 | padding: 15px; 23 | margin: 10px; 24 | width: 20%; 25 | font-size: 15px; 26 | outline: none; 27 | border-radius: 3px; 28 | color: #FFF; 29 | font-weight: bold; 30 | } 31 | 32 | .btn.blue-btn { 33 | background-color: #55acee; 34 | box-shadow: 0px 5px 0px 0px #3C93D5; 35 | } 36 | 37 | .btn.blue-btn:hover { 38 | background-color: #6FC6FF; 39 | } 40 | -------------------------------------------------------------------------------- /Lecture 11 Higher Order Components/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Lecture 11 Higher Order Components/2 - End/lesson11styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | 14 | .container label { 15 | margin: 0; 16 | padding: 20px; 17 | font-size: 36px; 18 | } 19 | 20 | .container .btn { 21 | border: 0; 22 | padding: 15px; 23 | margin: 10px; 24 | width: 20%; 25 | font-size: 15px; 26 | outline: none; 27 | border-radius: 3px; 28 | color: #FFF; 29 | font-weight: bold; 30 | } 31 | 32 | .btn.blue-btn { 33 | background-color: #55acee; 34 | box-shadow: 0px 5px 0px 0px #3C93D5; 35 | } 36 | 37 | .btn.blue-btn:hover { 38 | background-color: #6FC6FF; 39 | } 40 | -------------------------------------------------------------------------------- /Lecture 12 Webpack setup/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react", "es2015", "stage-1"] 3 | } 4 | -------------------------------------------------------------------------------- /Lecture 12 Webpack setup/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Lecture 12 Webpack setup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-from-the-ground-up-setup", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js" 8 | }, 9 | "author": "CodeWithTim", 10 | "license": "ISC", 11 | "dependencies": { 12 | "babel-core": "6.8.0", 13 | "babel-loader": "6.2.4", 14 | "babel-preset-es2015": "6.6.0", 15 | "babel-preset-react": "6.5.0", 16 | "babel-preset-stage-1": "6.5.0", 17 | "babel-standalone": "^6.7.7", 18 | "react": "15.0.2", 19 | "react-dom": "15.0.2", 20 | "webpack": "1.13.0", 21 | "webpack-dev-server": "1.14.1" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Lecture 12 Webpack setup/src/components/babel-transformer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as Babel from 'babel-standalone'; 3 | 4 | export default class BabelTransformer extends React.Component { 5 | constructor() { 6 | super(); 7 | this.state = { 8 | inputJSX: '/* Add your JSX here */', 9 | outputJS: '', 10 | error: '' 11 | } 12 | this.transformJSX = this.transformJSX.bind(this); 13 | } 14 | 15 | transformJSX(event) { 16 | let code = event.target.value; 17 | try { 18 | this.setState({ 19 | outputJS: Babel.transform(code, { sourceMaps: true, presets: ['es2015', 'react'] }).code, 20 | error: '' 21 | }); 22 | 23 | console.log(this.state.outputJS); 24 | } 25 | catch(error) { 26 | this.setState({error: error.message}) 27 | } 28 | } 29 | render() { 30 | 31 | return ( 32 |
33 |
34 | 35 |
36 |           {this.state.outputJS}
37 |         
38 | 39 |
40 | 41 |
42 | ) 43 | } 44 | }; 45 | -------------------------------------------------------------------------------- /Lecture 12 Webpack setup/src/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import BabelTransformer from './components/babel-transformer'; 4 | 5 | ReactDOM.render( 6 | , 7 | document.getElementById('app') 8 | ); -------------------------------------------------------------------------------- /Lecture 12 Webpack setup/style/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | /*font-family: monospace;*/ 5 | } 6 | 7 | footer { 8 | display: block; 9 | height: 10vh; 10 | overflow: auto; 11 | background-color: #f1f1f1; 12 | color: #c7254e; 13 | font-size: 28px; 14 | padding: 20px; 15 | box-sizing: border-box; 16 | } 17 | 18 | .container { 19 | height: 90vh; 20 | display: flex; 21 | box-sizing: border-box; 22 | 23 | } 24 | 25 | pre, textarea { 26 | width: 50%; 27 | margin: 0; 28 | padding: 10px; 29 | color: #222; 30 | overflow: scroll; 31 | } 32 | 33 | 34 | textarea:focus { 35 | outline: 0; 36 | } -------------------------------------------------------------------------------- /Lecture 12 Webpack setup/webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | entry: [ 3 | './src/index.jsx' 4 | ], 5 | output: { 6 | filename: './bundle.js' 7 | }, 8 | module: { 9 | loaders: [{ 10 | exclude: /node_modules/, 11 | loader: 'babel' 12 | }] 13 | }, 14 | resolve: { 15 | extensions: ['', '.js', '.jsx'] 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /Lecture 13 JSX Transformer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Lecture 13 JSX Transformer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-from-the-ground-up-setup", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js" 8 | }, 9 | "author": "CodeWithTim", 10 | "license": "ISC", 11 | "dependencies": { 12 | "babel-core": "^6.8.0", 13 | "babel-loader": "^6.2.4", 14 | "babel-preset-es2015": "^6.6.0", 15 | "babel-preset-react": "^6.5.0", 16 | "babel-preset-stage-1": "^6.5.0", 17 | "babel-standalone": "^6.7.7", 18 | "react": "^15.0.2", 19 | "react-dom": "^15.0.2", 20 | "webpack": "^1.13.0", 21 | "webpack-dev-server": "^1.14.1" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Lecture 13 JSX Transformer/src/components/babel-transformer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import * as Babel from 'babel-standalone'; 3 | 4 | export default class BabelTransformer extends React.Component { 5 | constructor(props) { 6 | super(props); 7 | this.state = { 8 | inputJSX: '/* Write some awesome JSX! */', 9 | outputJS: '', 10 | error: '' 11 | } 12 | this.transformJSX = this.transformJSX.bind(this); 13 | } 14 | transformJSX(event) { 15 | let code = event.target.value; 16 | try { 17 | this.setState({ 18 | outputJS: Babel.transform(code, { presets: ['es2015', 'react'] }).code, 19 | error: '' 20 | }); 21 | } 22 | catch(error) { 23 | this.setState({ 24 | error: error.message 25 | }); 26 | } 27 | } 28 | render() { 29 | return ( 30 |
31 |
32 | 33 |
{this.state.outputJS}
34 |
35 |
{this.state.error}
36 |
37 | ) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Lecture 13 JSX Transformer/src/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import BabelTransformer from './components/babel-transformer'; 4 | 5 | console.log(BabelTransformer); 6 | 7 | ReactDOM.render( 8 | , 9 | document.getElementById('app') 10 | ); 11 | -------------------------------------------------------------------------------- /Lecture 13 JSX Transformer/style/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | footer { 7 | display: block; 8 | height: 10vh; 9 | overflow: auto; 10 | background-color: #f1f1f1; 11 | color: #c7254e; 12 | font-size: 28px; 13 | padding: 20px; 14 | box-sizing: border-box; 15 | } 16 | 17 | .container { 18 | height: 90vh; 19 | display: flex; 20 | box-sizing: border-box; 21 | } 22 | 23 | #output, textarea { 24 | width: 50%; 25 | margin: 0; 26 | padding: 10px; 27 | color: #222; 28 | overflow: scroll; 29 | } 30 | 31 | textarea:focus { 32 | outline: 0; 33 | } 34 | -------------------------------------------------------------------------------- /Lecture 13 JSX Transformer/webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | entry: [ 3 | './src/index.jsx' 4 | ], 5 | output: { 6 | filename: './bundle.js' 7 | }, 8 | module: { 9 | loaders: [{ 10 | exclude: /node_modules/, 11 | loader: 'babel' 12 | }] 13 | }, 14 | resolve: { 15 | extensions: ['', '.js', '.jsx'] 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/README.md: -------------------------------------------------------------------------------- 1 | Lesson 14 of React From The Ground Up - PokeDashboard Making API Calls 2 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithtim/ReactJSTutorial/8a80aba609ed27621a4f7be166ddce7b8be307d5/Lecture 14 PokeDashboard Making API Calls/favicon.ico -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React App 7 | 8 | 9 | 10 |
11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pokedashboard", 3 | "version": "0.0.1", 4 | "private": true, 5 | "devDependencies": { 6 | "react-scripts": "0.2.1" 7 | }, 8 | "dependencies": { 9 | "react": "^15.2.1", 10 | "react-dom": "^15.2.1" 11 | }, 12 | "scripts": { 13 | "start": "react-scripts start", 14 | "build": "react-scripts build", 15 | "eject": "react-scripts eject" 16 | }, 17 | "eslintConfig": { 18 | "extends": "./node_modules/react-scripts/config/eslint.js" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color: #222; 12 | height: 150px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-intro { 18 | font-size: large; 19 | } 20 | 21 | .PokeList-item { 22 | text-transform: capitalize;; 23 | } 24 | @keyframes App-logo-spin { 25 | from { transform: rotate(0deg); } 26 | to { transform: rotate(360deg); } 27 | } 28 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | import 'whatwg-fetch'; 5 | 6 | class App extends Component { 7 | 8 | constructor(props) { 9 | super(props); 10 | 11 | this.state = { 12 | pokemon: [] 13 | }; 14 | 15 | this.loadPokemon = this.loadPokemon.bind(this); 16 | } 17 | 18 | loadPokemon(url) { 19 | fetch(url) 20 | .then(response => { 21 | return response.json(); 22 | }).then(json => { 23 | console.log(json); 24 | let pages = Math.round(json.count / this.state.limit); 25 | 26 | this.setState({ 27 | pokemon: json.results, 28 | totalPages: pages, 29 | count: json.count 30 | }); 31 | console.log(this.state) 32 | }).catch(err => { 33 | console.log(err) 34 | }) 35 | } 36 | 37 | componentWillMount() { 38 | this.loadPokemon(`${this.props.baseUrl}/pokemon/`); 39 | } 40 | 41 | render() { 42 | return ( 43 |
44 |
45 | logo 46 |

Welcome to React

47 |
48 |
49 | ); 50 | } 51 | } 52 | 53 | export default App; 54 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | let baseUrl = 'http://pokeapi.co/api/v2'; 7 | 8 | ReactDOM.render( 9 | , 10 | document.getElementById('root') 11 | ); 12 | -------------------------------------------------------------------------------- /Lecture 14 PokeDashboard Making API Calls/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/README.md: -------------------------------------------------------------------------------- 1 | Lesson 15 of React From The Ground Up - PokeDashboard PokeList 2 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithtim/ReactJSTutorial/8a80aba609ed27621a4f7be166ddce7b8be307d5/Lecture 15 PokeDashboard PokeList/favicon.ico -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React App 7 | 8 | 9 | 10 |
11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pokedashboard", 3 | "version": "0.0.1", 4 | "private": true, 5 | "devDependencies": { 6 | "react-scripts": "0.2.1" 7 | }, 8 | "dependencies": { 9 | "react": "^15.2.1", 10 | "react-bootstrap": "^0.30.2", 11 | "react-dom": "^15.2.1" 12 | }, 13 | "scripts": { 14 | "start": "react-scripts start", 15 | "build": "react-scripts build", 16 | "eject": "react-scripts eject" 17 | }, 18 | "eslintConfig": { 19 | "extends": "./node_modules/react-scripts/config/eslint.js" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color: #222; 12 | height: 150px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-intro { 18 | font-size: large; 19 | } 20 | 21 | .PokeList-item { 22 | text-transform: capitalize;; 23 | } 24 | @keyframes App-logo-spin { 25 | from { transform: rotate(0deg); } 26 | to { transform: rotate(360deg); } 27 | } 28 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | import 'whatwg-fetch'; 5 | import PokeList from './components/PokeList'; 6 | import { Col } from 'react-bootstrap/lib/'; 7 | 8 | class App extends Component { 9 | 10 | constructor(props) { 11 | super(props); 12 | 13 | this.state = { 14 | pokemon: [] 15 | }; 16 | 17 | this.loadPokemon = this.loadPokemon.bind(this); 18 | } 19 | 20 | loadPokemon(url) { 21 | fetch(url) 22 | .then(response => { 23 | return response.json(); 24 | }).then(json => { 25 | console.log(json); 26 | let pages = Math.round(json.count / this.state.limit); 27 | 28 | this.setState({ 29 | pokemon: json.results, 30 | totalPages: pages, 31 | count: json.count 32 | }); 33 | console.log(this.state) 34 | }).catch(err => { 35 | console.log(err) 36 | }) 37 | } 38 | 39 | componentWillMount() { 40 | this.loadPokemon(`${this.props.baseUrl}/pokemon/`); 41 | } 42 | 43 | render() { 44 | return ( 45 |
46 |
47 | logo 48 |

Welcome to React

49 |
50 | 51 | 52 | 53 | 54 | 55 |
56 | ); 57 | } 58 | } 59 | 60 | export default App; 61 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/src/components/PokeList.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ListGroup, ListGroupItem, Col } from 'react-bootstrap/lib/'; 3 | 4 | const PokeList = ({listOfPokemon}) => { 5 | 6 | let pokemon = listOfPokemon.map((creature) => { 7 | return ( 8 | 9 | {creature.name} 10 | 11 | ) 12 | }); 13 | 14 | return ( 15 | 16 | {pokemon} 17 | 18 | ) 19 | } 20 | 21 | export default PokeList; 22 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | let baseUrl = 'http://pokeapi.co/api/v2'; 7 | 8 | ReactDOM.render( 9 | , 10 | document.getElementById('root') 11 | ); 12 | -------------------------------------------------------------------------------- /Lecture 15 PokeDashboard PokeList/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/README.md: -------------------------------------------------------------------------------- 1 | Lesson 14 of React From The Ground Up - PokeDashboard Pagination 2 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codewithtim/ReactJSTutorial/8a80aba609ed27621a4f7be166ddce7b8be307d5/Lecture 16 PokeDashboard Pagination/favicon.ico -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React App 7 | 8 | 9 | 10 |
11 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pokedashboard", 3 | "version": "0.0.1", 4 | "private": true, 5 | "devDependencies": { 6 | "react-scripts": "0.2.1" 7 | }, 8 | "dependencies": { 9 | "react": "^15.2.1", 10 | "react-bootstrap": "^0.30.2", 11 | "react-dom": "^15.2.1" 12 | }, 13 | "scripts": { 14 | "start": "react-scripts start", 15 | "build": "react-scripts build", 16 | "eject": "react-scripts eject" 17 | }, 18 | "eslintConfig": { 19 | "extends": "./node_modules/react-scripts/config/eslint.js" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color: #222; 12 | height: 150px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-intro { 18 | font-size: large; 19 | } 20 | 21 | .PokeList-item { 22 | text-transform: capitalize;; 23 | } 24 | @keyframes App-logo-spin { 25 | from { transform: rotate(0deg); } 26 | to { transform: rotate(360deg); } 27 | } 28 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | import 'whatwg-fetch'; 5 | import PokeList from './components/PokeList'; 6 | import { Col, Pagination } from 'react-bootstrap/lib/'; 7 | 8 | class App extends Component { 9 | 10 | constructor(props) { 11 | super(props); 12 | 13 | this.state = { 14 | pokemon: [], 15 | activePage: 0, 16 | limit: 50, 17 | offset: 0, 18 | totalPages: 0 19 | }; 20 | 21 | this.loadPokemon = this.loadPokemon.bind(this); 22 | this.handlePaginationSelect = this.handlePaginationSelect.bind(this); 23 | } 24 | 25 | loadPokemon(url) { 26 | fetch(url) 27 | .then(response => { 28 | return response.json(); 29 | }).then(json => { 30 | console.log(json); 31 | let pages = Math.round(json.count / this.state.limit); 32 | 33 | this.setState({ 34 | pokemon: json.results, 35 | totalPages: pages, 36 | count: json.count 37 | }); 38 | console.log(this.state) 39 | }).catch(err => { 40 | console.log(err) 41 | }) 42 | } 43 | 44 | componentWillMount() { 45 | this.loadPokemon(`${this.props.baseUrl}/pokemon/?limit=${this.state.limit}&offset=${this.state.offset}`); 46 | } 47 | 48 | handlePaginationSelect(selectedPage) { 49 | console.log(selectedPage); 50 | let offset = this.state.limit * selectedPage; 51 | this.loadPokemon(`${this.props.baseUrl}/pokemon/?limit=${this.state.limit}&offset=${offset}`); 52 | } 53 | 54 | render() { 55 | return ( 56 |
57 |
58 | logo 59 |

Welcome to React

60 |
61 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 74 |
75 | ); 76 | } 77 | } 78 | 79 | export default App; 80 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/src/components/PokeList.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ListGroup, ListGroupItem, Col } from 'react-bootstrap/lib/'; 3 | 4 | const PokeList = ({listOfPokemon}) => { 5 | 6 | let pokemon = listOfPokemon.map((creature) => { 7 | return ( 8 | 9 | {creature.name} 10 | 11 | ) 12 | }); 13 | 14 | return ( 15 | 16 | {pokemon} 17 | 18 | ) 19 | } 20 | 21 | export default PokeList; 22 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | let baseUrl = 'http://pokeapi.co/api/v2'; 7 | 8 | ReactDOM.render( 9 | , 10 | document.getElementById('root') 11 | ); 12 | -------------------------------------------------------------------------------- /Lecture 16 PokeDashboard Pagination/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lecture 17 PokeDashboard Items Per Page/README.md: -------------------------------------------------------------------------------- 1 | Below you will find some information on how to perform common tasks. 2 | You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md). 3 | 4 | ## Sending Feedback 5 | 6 | We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). 7 | 8 | ## Folder Structure 9 | 10 | After creation, your project should look like this: 11 | 12 | ``` 13 | my-app/ 14 | README.md 15 | index.html 16 | favicon.ico 17 | node_modules/ 18 | package.json 19 | src/ 20 | App.css 21 | App.js 22 | index.css 23 | index.js 24 | logo.svg 25 | ``` 26 | 27 | For the project to build, **these files must exist with exact filenames**: 28 | 29 | * `index.html` is the page template; 30 | * `favicon.ico` is the icon you see in the browser tab; 31 | * `src/index.js` is the JavaScript entry point. 32 | 33 | You can delete or rename the other files. 34 | 35 | You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack. 36 | You need to **put any JS and CSS files inside `src`**, or Webpack won’t see them. 37 | 38 | You can, however, create more top-level directories. 39 | They will not be included in the production build so you can use them for things like documentation. 40 | 41 | >**Known Issue:** 42 | > 43 | >You may encounter an issue where changing a file inside `src` doesn’t trigger a recompilation. Most likely this happens because the path in your filesystem differs in its casing from the path you imported. For example, if a file is called `App.js` but you are importing `app.js`, the watcher might not recognize changes to it. We are [considering](https://github.com/facebookincubator/create-react-app/issues/240) enforcing some checks to prevent this. If this doesn’t help, check out the page on [troubleshooting watching](https://webpack.github.io/docs/troubleshooting.html#watching). 44 | 45 | ## Available Scripts 46 | 47 | In the project directory, you can run: 48 | 49 | ### `npm start` 50 | 51 | Runs the app in the development mode.
52 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 53 | 54 | The page will reload if you make edits.
55 | You will also see any lint errors in the console. 56 | 57 | ### `npm run build` 58 | 59 | Builds the app for production to the `build` folder.
60 | It correctly bundles React in production mode and optimizes the build for the best performance. 61 | 62 | The build is minified and the filenames include the hashes.
63 | Your app is ready to be deployed! 64 | 65 | ### `npm run eject` 66 | 67 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 68 | 69 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 70 | 71 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 72 | 73 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 74 | 75 | ## How To... 76 | 77 | ### Install a Dependency 78 | 79 | The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: 80 | 81 | ``` 82 | npm install --save 83 | ``` 84 | 85 | ### Import a Component 86 | 87 | This project setup supports ES6 modules thanks to Babel. 88 | While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. 89 | 90 | For example: 91 | 92 | ### `Button.js` 93 | 94 | ```js 95 | import React, { Component } from 'react'; 96 | 97 | class Button extends Component { 98 | render() { 99 | // ... 100 | } 101 | } 102 | 103 | export default Button; // Don’t forget to use export default! 104 | ``` 105 | 106 | ### `DangerButton.js` 107 | 108 | ```js 109 | import React, { Component } from 'react'; 110 | import Button from './Button'; // Import a component from another file 111 | 112 | class DangerButton extends Component { 113 | render() { 114 | return 10 | })} 11 | {allValue ? : false} 12 | 13 | ) 14 | } 15 | 16 | export default SelectItemsPerPageButtons; 17 | -------------------------------------------------------------------------------- /Lecture 17 PokeDashboard Items Per Page/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Lecture 17 PokeDashboard Items Per Page/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | let baseUrl = 'http://pokeapi.co/api/v2'; 7 | 8 | ReactDOM.render( 9 | , 10 | document.getElementById('root') 11 | ); 12 | -------------------------------------------------------------------------------- /Lecture 17 PokeDashboard Items Per Page/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lecture 18 Refactor & PokemonIndexList/README.md: -------------------------------------------------------------------------------- 1 | Below you will find some information on how to perform common tasks. 2 | You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md). 3 | 4 | ## Sending Feedback 5 | 6 | We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). 7 | 8 | ## Folder Structure 9 | 10 | After creation, your project should look like this: 11 | 12 | ``` 13 | my-app/ 14 | README.md 15 | index.html 16 | favicon.ico 17 | node_modules/ 18 | package.json 19 | src/ 20 | App.css 21 | App.js 22 | index.css 23 | index.js 24 | logo.svg 25 | ``` 26 | 27 | For the project to build, **these files must exist with exact filenames**: 28 | 29 | * `index.html` is the page template; 30 | * `favicon.ico` is the icon you see in the browser tab; 31 | * `src/index.js` is the JavaScript entry point. 32 | 33 | You can delete or rename the other files. 34 | 35 | You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack. 36 | You need to **put any JS and CSS files inside `src`**, or Webpack won’t see them. 37 | 38 | You can, however, create more top-level directories. 39 | They will not be included in the production build so you can use them for things like documentation. 40 | 41 | >**Known Issue:** 42 | > 43 | >You may encounter an issue where changing a file inside `src` doesn’t trigger a recompilation. Most likely this happens because the path in your filesystem differs in its casing from the path you imported. For example, if a file is called `App.js` but you are importing `app.js`, the watcher might not recognize changes to it. We are [considering](https://github.com/facebookincubator/create-react-app/issues/240) enforcing some checks to prevent this. If this doesn’t help, check out the page on [troubleshooting watching](https://webpack.github.io/docs/troubleshooting.html#watching). 44 | 45 | ## Available Scripts 46 | 47 | In the project directory, you can run: 48 | 49 | ### `npm start` 50 | 51 | Runs the app in the development mode.
52 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 53 | 54 | The page will reload if you make edits.
55 | You will also see any lint errors in the console. 56 | 57 | ### `npm run build` 58 | 59 | Builds the app for production to the `build` folder.
60 | It correctly bundles React in production mode and optimizes the build for the best performance. 61 | 62 | The build is minified and the filenames include the hashes.
63 | Your app is ready to be deployed! 64 | 65 | ### `npm run eject` 66 | 67 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 68 | 69 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 70 | 71 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 72 | 73 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 74 | 75 | ## How To... 76 | 77 | ### Install a Dependency 78 | 79 | The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: 80 | 81 | ``` 82 | npm install --save 83 | ``` 84 | 85 | ### Import a Component 86 | 87 | This project setup supports ES6 modules thanks to Babel. 88 | While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. 89 | 90 | For example: 91 | 92 | ### `Button.js` 93 | 94 | ```js 95 | import React, { Component } from 'react'; 96 | 97 | class Button extends Component { 98 | render() { 99 | // ... 100 | } 101 | } 102 | 103 | export default Button; // Don’t forget to use export default! 104 | ``` 105 | 106 | ### `DangerButton.js` 107 | 108 | ```js 109 | import React, { Component } from 'react'; 110 | import Button from './Button'; // Import a component from another file 111 | 112 | class DangerButton extends Component { 113 | render() { 114 | return 10 | })} 11 | {allValue ? : false} 12 | 13 | ) 14 | } 15 | 16 | export default SelectItemsPerPageButtons; 17 | -------------------------------------------------------------------------------- /Lecture 18 Refactor & PokemonIndexList/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /Lecture 18 Refactor & PokemonIndexList/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | let baseUrl = 'http://pokeapi.co/api/v2'; 7 | 8 | ReactDOM.render( 9 | , 10 | document.getElementById('root') 11 | ); 12 | -------------------------------------------------------------------------------- /Lecture 18 Refactor & PokemonIndexList/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 11 | 15 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /Lecture 2 JSX Component/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 |
11 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Lecture 2 JSX Component/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Lecture 3 CreateClass/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Lecture 3 CreateClass/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Lecture 4 Props/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Lecture 4 Props/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Lecture 4-1 Aside - The let keyword/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Lecture 4-1 Aside - The let keyword/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 1/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 1/1 - Start/lesson5challengestyling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | 39 | .btn.blue-btn { 40 | background-color: #55acee; 41 | box-shadow: 0px 5px 0px 0px #3C93D5; 42 | } 43 | 44 | .btn.blue-btn:hover { 45 | background-color: #6FC6FF; 46 | } 47 | 48 | .btn.green-btn { 49 | background-color: #2ecc71; 50 | box-shadow: 0px 5px 0px 0px #15B358; 51 | } 52 | 53 | .btn.green-btn:hover { 54 | background-color: #48E68B; 55 | } 56 | 57 | .btn.purple-btn { 58 | background-color: #9b59b6; 59 | box-shadow: 0px 5px 0px 0px #82409D; 60 | } 61 | 62 | .btn.purple-btn:hover { 63 | background-color: #B573D0; 64 | } 65 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 1/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 1/2 - End/lesson5challengestyling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | 39 | .btn.blue-btn { 40 | background-color: #55acee; 41 | box-shadow: 0px 5px 0px 0px #3C93D5; 42 | } 43 | 44 | .btn.blue-btn:hover { 45 | background-color: #6FC6FF; 46 | } 47 | 48 | .btn.green-btn { 49 | background-color: #2ecc71; 50 | box-shadow: 0px 5px 0px 0px #15B358; 51 | } 52 | 53 | .btn.green-btn:hover { 54 | background-color: #48E68B; 55 | } 56 | 57 | .btn.purple-btn { 58 | background-color: #9b59b6; 59 | box-shadow: 0px 5px 0px 0px #82409D; 60 | } 61 | 62 | .btn.purple-btn:hover { 63 | background-color: #B573D0; 64 | } 65 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 2/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 2/1 - Start/lesson5challengestyling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | 39 | .btn.blue-btn { 40 | background-color: #55acee; 41 | box-shadow: 0px 5px 0px 0px #3C93D5; 42 | } 43 | 44 | .btn.blue-btn:hover { 45 | background-color: #6FC6FF; 46 | } 47 | 48 | .btn.green-btn { 49 | background-color: #2ecc71; 50 | box-shadow: 0px 5px 0px 0px #15B358; 51 | } 52 | 53 | .btn.green-btn:hover { 54 | background-color: #48E68B; 55 | } 56 | 57 | .btn.purple-btn { 58 | background-color: #9b59b6; 59 | box-shadow: 0px 5px 0px 0px #82409D; 60 | } 61 | 62 | .btn.purple-btn:hover { 63 | background-color: #B573D0; 64 | } 65 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 2/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge Refactor 2/2 - End/lesson5challengestyling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | 39 | .btn.blue-btn { 40 | background-color: #55acee; 41 | box-shadow: 0px 5px 0px 0px #3C93D5; 42 | } 43 | 44 | .btn.blue-btn:hover { 45 | background-color: #6FC6FF; 46 | } 47 | 48 | .btn.green-btn { 49 | background-color: #2ecc71; 50 | box-shadow: 0px 5px 0px 0px #15B358; 51 | } 52 | 53 | .btn.green-btn:hover { 54 | background-color: #48E68B; 55 | } 56 | 57 | .btn.purple-btn { 58 | background-color: #9b59b6; 59 | box-shadow: 0px 5px 0px 0px #82409D; 60 | } 61 | 62 | .btn.purple-btn:hover { 63 | background-color: #B573D0; 64 | } 65 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge/1 - Start/lesson5challengestyling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | 39 | .btn.blue-btn { 40 | background-color: #55acee; 41 | box-shadow: 0px 5px 0px 0px #3C93D5; 42 | } 43 | 44 | .btn.blue-btn:hover { 45 | background-color: #6FC6FF; 46 | } 47 | 48 | .btn.green-btn { 49 | background-color: #2ecc71; 50 | box-shadow: 0px 5px 0px 0px #15B358; 51 | } 52 | 53 | .btn.green-btn:hover { 54 | background-color: #48E68B; 55 | } 56 | 57 | .btn.purple-btn { 58 | background-color: #9b59b6; 59 | box-shadow: 0px 5px 0px 0px #82409D; 60 | } 61 | 62 | .btn.purple-btn:hover { 63 | background-color: #B573D0; 64 | } 65 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /Lecture 5 State Challenge/2 - End/lesson5challengestyling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | 39 | .btn.blue-btn { 40 | background-color: #55acee; 41 | box-shadow: 0px 5px 0px 0px #3C93D5; 42 | } 43 | 44 | .btn.blue-btn:hover { 45 | background-color: #6FC6FF; 46 | } 47 | 48 | .btn.green-btn { 49 | background-color: #2ecc71; 50 | box-shadow: 0px 5px 0px 0px #15B358; 51 | } 52 | 53 | .btn.green-btn:hover { 54 | background-color: #48E68B; 55 | } 56 | 57 | .btn.purple-btn { 58 | background-color: #9b59b6; 59 | box-shadow: 0px 5px 0px 0px #82409D; 60 | } 61 | 62 | .btn.purple-btn:hover { 63 | background-color: #B573D0; 64 | } 65 | -------------------------------------------------------------------------------- /Lecture 5 State/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Lecture 5 State/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Lecture 6 Stateless Functional Components/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Lecture 6 Stateless Functional Components/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Lecture 7 Lifecycle Components/Part 1/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Lecture 7 Lifecycle Components/Part 1/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Lecture 7 Lifecycle Components/Part 2/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Lecture 7 Lifecycle Components/Part 2/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Lecture 7 Lifecycle Components/Part 2/2 - End/lesson7challengestyling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .btn { 14 | border: 0; 15 | padding: 15px; 16 | margin: 20px; 17 | width: 20%; 18 | font-size: 15px; 19 | outline: none; 20 | border-radius: 3px; 21 | color: #FFF; 22 | font-weight: bold; 23 | } 24 | 25 | .btn.blue-btn { 26 | background-color: #55acee; 27 | box-shadow: 0px 5px 0px 0px #3C93D5; 28 | margin: 0 auto; 29 | } 30 | 31 | .btn.blue-btn:hover { 32 | background-color: #6FC6FF; 33 | } 34 | 35 | .btn.blue-btn { 36 | background-color: #55acee; 37 | box-shadow: 0px 5px 0px 0px #3C93D5; 38 | } 39 | 40 | .btn.blue-btn:hover { 41 | background-color: #6FC6FF; 42 | } 43 | 44 | .btn.green-btn { 45 | background-color: #2ecc71; 46 | box-shadow: 0px 5px 0px 0px #15B358; 47 | } 48 | 49 | .btn.green-btn:hover { 50 | background-color: #48E68B; 51 | } 52 | 53 | .btn.red-btn { 54 | background-color: #e74c3c; 55 | box-shadow: 0px 5px 0px 0px #c0392b; 56 | } 57 | 58 | .btn.red-btn:hover { 59 | background-color: #F75E53; 60 | } 61 | -------------------------------------------------------------------------------- /Lecture 8 Lifecycle component updates/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Lecture 8 Lifecycle component updates/1 - Start/lesson8styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | -------------------------------------------------------------------------------- /Lecture 8 Lifecycle component updates/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /Lecture 8 Lifecycle component updates/2 - End/lesson8styling.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 40px; 3 | font-family: "helvetica neue", sans-serif; 4 | } 5 | 6 | .container { 7 | width: 600px; 8 | margin: auto; 9 | color: black; 10 | padding: 20px; 11 | text-align: center; 12 | } 13 | .container h1 { 14 | margin: 0; 15 | padding: 20px; 16 | font-size: 36px; 17 | } 18 | .container .btn { 19 | border: 0; 20 | padding: 15px; 21 | margin: 10px; 22 | width: 20%; 23 | font-size: 15px; 24 | outline: none; 25 | border-radius: 3px; 26 | color: #FFF; 27 | font-weight: bold; 28 | } 29 | 30 | .btn.blue-btn { 31 | background-color: #55acee; 32 | box-shadow: 0px 5px 0px 0px #3C93D5; 33 | } 34 | 35 | .btn.blue-btn:hover { 36 | background-color: #6FC6FF; 37 | } 38 | -------------------------------------------------------------------------------- /Lecture 9 ES6 Classes/1 - Start/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Lecture 9 ES6 Classes/2 - End/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React tutorial 6 | 7 | 8 | 9 | 10 | 11 |
12 | 40 | 41 | 42 | --------------------------------------------------------------------------------