├── .gitignore
├── .prettierrc
├── .vscode
└── settings.json
├── A01 - Pomodoro
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── A02 - Markdown Editor
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── A03 - Highlight Tabs
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── Routes.js
│ │ ├── components
│ │ │ ├── Header.js
│ │ │ └── Tab.js
│ │ ├── index.js
│ │ └── pages
│ │ │ ├── About.js
│ │ │ ├── Features.js
│ │ │ └── Home.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── A04 - Paper Rock Scissors
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── icons
│ │ │ ├── Paper.js
│ │ │ ├── Rock.js
│ │ │ └── Scissors.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ ├── icons
│ │ ├── Paper.js
│ │ ├── Rock.js
│ │ └── Scissors.js
│ └── index.js
│ └── yarn.lock
├── A05 - Moving Link
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── index.js
│ │ └── useMovement.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── A06 - Infinite Image Gallery
├── README.md
├── finished
│ ├── .env.example
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── .env.example
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── A07 - Trivia Game
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── categories.js
│ │ ├── components
│ │ │ ├── CategorySelector.js
│ │ │ ├── Question.js
│ │ │ ├── ResultModal.js
│ │ │ └── Scoreboard.js
│ │ ├── index.js
│ │ └── useTrivia.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ ├── categories.js
│ ├── components
│ │ ├── CategorySelector.js
│ │ ├── Question.js
│ │ ├── ResultModal.js
│ │ └── Scoreboard.js
│ └── index.js
│ └── yarn.lock
├── A08 - Authentication
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── components
│ │ │ ├── PrivateRoute.js
│ │ │ └── SiteHeader.js
│ │ ├── contexts
│ │ │ └── auth0-context.js
│ │ ├── img
│ │ │ ├── frodo.png
│ │ │ ├── gandalf.png
│ │ │ └── gollum.png
│ │ ├── index.js
│ │ └── pages
│ │ │ ├── Dashboard.js
│ │ │ └── Home.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ ├── components
│ │ └── SiteHeader.js
│ ├── img
│ │ ├── frodo.png
│ │ ├── gandalf.png
│ │ └── gollum.png
│ ├── index.js
│ └── pages
│ │ ├── Dashboard.js
│ │ └── Home.js
│ └── yarn.lock
├── A09 - Web Speech and Timers
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── A10 - Calendar Picker
├── README.md
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── B01 - Animated Chat Box
├── README.md
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── B02 - Multi-Step Form
├── README.md
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── components
│ │ │ └── SignupForm
│ │ │ │ ├── 1ProfileForm.js
│ │ │ │ ├── 2SocialForm.js
│ │ │ │ ├── 3Review.js
│ │ │ │ ├── Animator.js
│ │ │ │ ├── SignupForm.js
│ │ │ │ ├── SignupFormContext.js
│ │ │ │ └── StepLinks.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── B03 - Memory Matching Game
├── README.md
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── B04 - Drag and Drop Math Card
├── README.md
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ └── src
│ ├── App.css
│ ├── App.js
│ └── index.js
├── B05 - Browser
├── README.md
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── components
│ │ │ ├── AddressBar.js
│ │ │ └── Tabs.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ ├── components
│ │ ├── AddressBar.js
│ │ └── Tabs.js
│ └── index.js
│ └── yarn.lock
├── B06 - Real-Time Search
├── README.md
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── B07 - Chart the Weather
├── README.md
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── components
│ │ │ ├── GeoForm.js
│ │ │ └── WeatherChart.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── B08 - Shopping Cart
├── finished
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── components
│ │ │ ├── Cart.js
│ │ │ ├── Header.js
│ │ │ └── Product.js
│ │ ├── contexts
│ │ │ └── use-cart.js
│ │ ├── index.js
│ │ ├── products.js
│ │ └── supermarket.svg
│ └── yarn.lock
└── start
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ ├── components
│ │ ├── Cart.js
│ │ └── Header.js
│ ├── index.js
│ ├── products.js
│ └── supermarket.svg
│ └── yarn.lock
├── B09 - Typing Test
├── finished
│ ├── README.md
│ ├── package.json
│ ├── public
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── logo192.png
│ │ ├── logo512.png
│ │ ├── manifest.json
│ │ └── robots.txt
│ ├── src
│ │ ├── App.css
│ │ ├── App.js
│ │ └── index.js
│ └── yarn.lock
└── start
│ ├── README.md
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
│ ├── src
│ ├── App.css
│ ├── App.js
│ └── index.js
│ └── yarn.lock
├── README.md
└── VS Code Setup.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 2,
3 | "useTabs": false,
4 | "singleQuote": true
5 | }
6 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "workbench.colorCustomizations": {
3 | "activityBar.activeBackground": "#1accff",
4 | "activityBar.activeBorder": "#df00ad",
5 | "activityBar.background": "#1accff",
6 | "activityBar.foreground": "#15202b",
7 | "activityBar.inactiveForeground": "#15202b99",
8 | "activityBarBadge.background": "#df00ad",
9 | "activityBarBadge.foreground": "#e7e7e7",
10 | "statusBar.background": "#00b3e6",
11 | "statusBar.border": "#00b3e6",
12 | "statusBar.foreground": "#15202b",
13 | "statusBarItem.hoverBackground": "#008bb3",
14 | "titleBar.activeBackground": "#00b3e6",
15 | "titleBar.activeForeground": "#15202b",
16 | "titleBar.border": "#00b3e6",
17 | "titleBar.inactiveBackground": "#00b3e699",
18 | "titleBar.inactiveForeground": "#15202b99"
19 | },
20 | "peacock.color": "#00b3e6"
21 | }
--------------------------------------------------------------------------------
/A01 - Pomodoro/README.md:
--------------------------------------------------------------------------------
1 | ## Pomodoro Timer
2 |
3 | We'll build a Pomodoro timer that can teach us about rendering in React.
4 |
5 | [View Demo](https://r36qd.codesandbox.io/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348620-01-pomodoro/992082-00-pomodoro-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348620-01-pomodoro/992082-00-pomodoro-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - Creating timers
12 | - React state w/ useState()
13 | - React effects w/ useEffect()
14 | - React refs w/ useRef()
15 | - Parent and child components
16 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A01 - Pomodoro/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A01 - Pomodoro/finished/public/logo192.png
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A01 - Pomodoro/finished/public/logo512.png
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A01 - Pomodoro/start/public/favicon.ico
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A01 - Pomodoro/start/public/logo192.png
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A01 - Pomodoro/start/public/logo512.png
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | export default function App() {
5 | return (
6 |
7 |
Pomodoro!
8 |
9 |
10 | 00
11 | :
12 | 00
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/A01 - Pomodoro/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/README.md:
--------------------------------------------------------------------------------
1 | ## Markdown Editor
2 |
3 | Let's build a real-time markdown previewer. As we update the markdown, we'll see the preview change on the right.
4 |
5 | [View Demo](https://391jg.codesandbox.io/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348621-02-markdown-editor/992079-00-markdown-editor-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348621-02-markdown-editor/992079-00-markdown-editor-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React state w/ useState()
12 | - 3rd Party Packages
13 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "marked": "^0.8.2",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-markdown": "^4.3.1",
13 | "react-scripts": "3.4.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A02 - Markdown Editor/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A02 - Markdown Editor/finished/public/logo192.png
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A02 - Markdown Editor/finished/public/logo512.png
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/src/App.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Hind&display=swap');
2 |
3 | body {
4 | background: #e8eaf1;
5 | font-family: 'Hind', Arial, Helvetica, sans-serif;
6 | }
7 |
8 | .app {
9 | min-height: 100vh;
10 | display: grid;
11 | grid-template-columns: 1fr 1fr;
12 | grid-gap: 15px;
13 | }
14 |
15 | textarea {
16 | background: #eff1f5;
17 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
18 | outline: none;
19 | border: none;
20 | border-radius: 5px;
21 | padding: 20px;
22 | font-size: 22px;
23 | }
24 |
25 | .preview {
26 | padding-left: 20px;
27 | padding-right: 20px;
28 | }
29 |
30 | blockquote {
31 | font-size: 30px;
32 | background: #efefef;
33 | border-left: 12px solid rgb(44, 163, 241);
34 | padding: 20px 30px;
35 | border-radius: 5px;
36 | margin: 0;
37 | }
38 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 | import marked from 'marked';
3 | import ReactMarkdown from 'react-markdown';
4 | import './App.css';
5 |
6 | export default function App() {
7 | const [markdown, setMarkdown] = useState('# suppppp');
8 |
9 | function handleChange(e) {
10 | setMarkdown(e.target.value);
11 | }
12 |
13 | return (
14 |
15 |
16 |
17 | {/*
*/}
21 |
22 |
23 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "marked": "^0.8.2",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-markdown": "^4.3.1",
13 | "react-scripts": "3.4.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A02 - Markdown Editor/start/public/favicon.ico
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A02 - Markdown Editor/start/public/logo192.png
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A02 - Markdown Editor/start/public/logo512.png
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/src/App.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Hind&display=swap');
2 |
3 | body {
4 | background: #e8eaf1;
5 | font-family: 'Hind', Arial, Helvetica, sans-serif;
6 | }
7 |
8 | .app {
9 | min-height: 100vh;
10 | display: grid;
11 | grid-template-columns: 1fr 1fr;
12 | grid-gap: 15px;
13 | }
14 |
15 | textarea {
16 | background: #eff1f5;
17 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
18 | outline: none;
19 | border: none;
20 | border-radius: 5px;
21 | padding: 20px;
22 | font-size: 22px;
23 | }
24 |
25 | .preview {
26 | padding-left: 20px;
27 | padding-right: 20px;
28 | }
29 |
30 | blockquote {
31 | font-size: 30px;
32 | background: #efefef;
33 | border-left: 12px solid rgb(44, 163, 241);
34 | padding: 20px 30px;
35 | border-radius: 5px;
36 | margin: 0;
37 | }
38 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | export default function App() {
5 | return (
6 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/A02 - Markdown Editor/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/README.md:
--------------------------------------------------------------------------------
1 | ## Highlighted Tabs
2 |
3 | In this app, we'll use mouse movement to highlight tabs. We'll also use the [React Router](https://reacttraining.com/react-router/) to route between tabs.
4 |
5 | [View Demo](https://yyhfg.codesandbox.io/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348622-03-highlight-tabs/992072-00-browser-tabs-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348622-03-highlight-tabs/992072-00-browser-tabs-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React Router
12 | - React state w/ useState()
13 | - React effects w/ useEffect()
14 | - Hover events
15 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.0",
11 | "react-router-dom": "^5.1.2",
12 | "react-scripts": "3.4.0"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A03 - Highlight Tabs/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A03 - Highlight Tabs/finished/public/logo192.png
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A03 - Highlight Tabs/finished/public/logo512.png
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { BrowserRouter as Router } from 'react-router-dom';
3 | import Header from './components/Header';
4 | import Routes from './Routes';
5 | import './App.css';
6 |
7 | function App() {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | );
21 | }
22 |
23 | export default App;
24 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/Routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Switch, Route } from 'react-router-dom';
3 | import Home from './pages/Home';
4 | import About from './pages/About';
5 | import Features from './pages/Features';
6 |
7 | export default function Router() {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/components/Header.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Tab from './Tab';
3 | import { NavLink } from 'react-router-dom';
4 |
5 | export default function Header() {
6 | return (
7 |
8 |
9 |
10 | Home
11 |
12 |
13 |
14 |
15 | About
16 |
17 |
18 |
19 |
20 | Features
21 |
22 |
23 |
24 | );
25 | }
26 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/components/Tab.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 |
3 | export default function Tab({ children }) {
4 | const [highlightStyle, setHighlightStyle] = useState({ left: 0, opacity: 0 });
5 |
6 | function moveHighlight(e) {
7 | // update highlightStyle to move the highlight
8 | setHighlightStyle({
9 | left: e.nativeEvent.layerX - 150,
10 | });
11 | }
12 |
13 | function hideHighlight(e) {
14 | setHighlightStyle({
15 | opacity: 0,
16 | left: e.nativeEvent.layerX - 150,
17 | });
18 | }
19 |
20 | return (
21 |
22 |
23 | {children}
24 |
25 | );
26 | }
27 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/pages/About.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function About() {
4 | return I am the About Page
;
5 | }
6 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/pages/Features.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function Features() {
4 | return I am the Features Page
;
5 | }
6 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/finished/src/pages/Home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function Home() {
4 | return I am the Home Page
;
5 | }
6 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.0",
11 | "react-router-dom": "^5.1.2",
12 | "react-scripts": "3.4.0"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A03 - Highlight Tabs/start/public/favicon.ico
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A03 - Highlight Tabs/start/public/logo192.png
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A03 - Highlight Tabs/start/public/logo512.png
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | function App() {
5 | return (
6 |
7 |
8 |
19 |
20 |
Pages Go Here
21 |
22 |
23 | );
24 | }
25 |
26 | export default App;
27 |
--------------------------------------------------------------------------------
/A03 - Highlight Tabs/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/README.md:
--------------------------------------------------------------------------------
1 | ## Paper Rock Scissors
2 |
3 | Lots of tools component work within this app to build a Paper, Rock, Scissors game.
4 |
5 | [View Demo](https://njpw4.codesandbox.io/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348623-04-paper-rock-scissors/992070-00-paper-rock-scissors-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348623-04-paper-rock-scissors/992070-00-paper-rock-scissors-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React state w/ useState()
12 | - React effects w/ useEffect()
13 | - React rendering
14 | - Parent and child components
15 | - React events
16 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.0",
11 | "react-scripts": "3.4.0"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A04 - Paper Rock Scissors/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A04 - Paper Rock Scissors/finished/public/logo192.png
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A04 - Paper Rock Scissors/finished/public/logo512.png
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.0",
11 | "react-scripts": "3.4.0"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A04 - Paper Rock Scissors/start/public/favicon.ico
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A04 - Paper Rock Scissors/start/public/logo192.png
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A04 - Paper Rock Scissors/start/public/logo512.png
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A04 - Paper Rock Scissors/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A05 - Moving Link/README.md:
--------------------------------------------------------------------------------
1 | ## Moving Boxes w/ Link and Canvas
2 |
3 | We'll use HTML canvas to draw a Link. We'll move
4 |
5 | [View Demo](https://405hq.codesandbox.io/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348624-05-moving-boxes-and-zelda/992093-00-moving-boxes-and-link-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348624-05-moving-boxes-and-zelda/992093-00-moving-boxes-and-link-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - HTML canvas
12 | - React state w/ useState()
13 | - React effects w/ useEffect()
14 | - Custom React Hook
15 |
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A05 - Moving Link/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A05 - Moving Link/finished/public/logo192.png
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A05 - Moving Link/finished/public/logo512.png
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/src/App.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | body {
6 | margin: 0;
7 | padding: 0;
8 | overflow: hidden;
9 | background-image: url('https://i.imgur.com/noNWRPk.png');
10 | }
11 |
12 | .app {
13 | position: relative;
14 | height: 100vh;
15 | }
16 |
17 | .arrows {
18 | display: grid;
19 | grid-template: auto auto / auto auto auto;
20 | grid-template-areas:
21 | '. up .'
22 | 'left down right';
23 | grid-gap: 8px;
24 | position: absolute;
25 | bottom: 20px;
26 | right: 20px;
27 | }
28 |
29 | .arrows button {
30 | cursor: pointer;
31 | font-size: 16px;
32 | width: 60px;
33 | height: 40px;
34 | background: rgba(43, 159, 75, 0.811);
35 | color: rgb(167, 220, 182);
36 | border: none;
37 | border-radius: 8px;
38 | outline: none;
39 | transition: 0.3s ease all;
40 | }
41 |
42 | .arrows button:hover {
43 | background: rgba(51, 177, 87, 0.811);
44 | color: #fff;
45 | }
46 |
47 | .arrows button:first-child {
48 | grid-area: up;
49 | }
50 |
51 | .arrows button:nth-child(2) {
52 | grid-area: left;
53 | }
54 |
55 | .arrows button:nth-child(3) {
56 | grid-area: down;
57 | }
58 |
59 | .arrows button:last-child {
60 | grid-area: right;
61 | }
62 |
63 | .images {
64 | display: none;
65 | }
66 |
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A05 - Moving Link/finished/src/useMovement.js:
--------------------------------------------------------------------------------
1 | import { useState, useEffect } from 'react';
2 |
3 | export default function useMovement() {
4 | const [x, setX] = useState(0);
5 | const [y, setY] = useState(0);
6 | const [direction, setDirection] = useState('down');
7 |
8 | // add event listener to window to listen for arrow keys
9 | useEffect(() => {
10 | window.addEventListener('keydown', handleKeyDown);
11 |
12 | function handleKeyDown(e) {
13 | if (e.key === 'ArrowUp') move('up');
14 | if (e.key === 'ArrowLeft') move('left');
15 | if (e.key === 'ArrowDown') move('down');
16 | if (e.key === 'ArrowRight') move('right');
17 | }
18 |
19 | return () => window.removeEventListener('keydown', handleKeyDown);
20 | }, []);
21 |
22 | function move(dir) {
23 | setDirection(dir);
24 | if (dir === 'up') setY((y) => y - 20);
25 | if (dir === 'left') setX((x) => x - 20);
26 | if (dir === 'down') setY((y) => y + 20);
27 | if (dir === 'right') setX((x) => x + 20);
28 | }
29 |
30 | return { x, y, direction, move };
31 | }
32 |
--------------------------------------------------------------------------------
/A05 - Moving Link/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A05 - Moving Link/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A05 - Moving Link/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A05 - Moving Link/start/public/favicon.ico
--------------------------------------------------------------------------------
/A05 - Moving Link/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A05 - Moving Link/start/public/logo192.png
--------------------------------------------------------------------------------
/A05 - Moving Link/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A05 - Moving Link/start/public/logo512.png
--------------------------------------------------------------------------------
/A05 - Moving Link/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A05 - Moving Link/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A05 - Moving Link/start/src/App.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | body {
6 | margin: 0;
7 | padding: 0;
8 | overflow: hidden;
9 | /* background-image: url('https://i.imgur.com/noNWRPk.png'); */
10 | }
11 |
12 | .app {
13 | position: relative;
14 | height: 100vh;
15 | }
16 |
17 | .arrows {
18 | display: grid;
19 | grid-template: auto auto / auto auto auto;
20 | grid-template-areas:
21 | '. up .'
22 | 'left down right';
23 | grid-gap: 8px;
24 | position: absolute;
25 | bottom: 20px;
26 | right: 20px;
27 | }
28 |
29 | .arrows button {
30 | cursor: pointer;
31 | font-size: 16px;
32 | width: 60px;
33 | height: 40px;
34 | background: rgba(43, 159, 75, 0.811);
35 | color: rgb(167, 220, 182);
36 | border: none;
37 | border-radius: 8px;
38 | outline: none;
39 | transition: 0.3s ease all;
40 | }
41 |
42 | .arrows button:hover {
43 | background: rgba(51, 177, 87, 0.811);
44 | color: #fff;
45 | }
46 |
47 | .arrows button:first-child {
48 | grid-area: up;
49 | }
50 |
51 | .arrows button:nth-child(2) {
52 | grid-area: left;
53 | }
54 |
55 | .arrows button:nth-child(3) {
56 | grid-area: down;
57 | }
58 |
59 | .arrows button:last-child {
60 | grid-area: right;
61 | }
62 |
63 | .images {
64 | display: none;
65 | }
66 |
--------------------------------------------------------------------------------
/A05 - Moving Link/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | export default function App() {
5 | return (
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
22 |
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/A05 - Moving Link/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/README.md:
--------------------------------------------------------------------------------
1 | ## Infinite Image Gallery
2 |
3 | We'll build an image gallery by pulling images from [Unsplash](https://unsplash.com/). We'll load more images as we scroll to the bottom. We also will be able to search Unsplash images.
4 |
5 | [View Demo](https://e9ucz.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348625-06-infinite-image-gallery/992060-00-infinite-image-gallery-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348625-06-infinite-image-gallery/992060-00-infinite-image-gallery-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - Fetching data from an API
12 | - React state w/ useState()
13 | - React effects w/ useEffect()
14 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/.env.example:
--------------------------------------------------------------------------------
1 | REACT_APP_UNSPLASH_ACCESS_KEY=myunsplashkeygoeshere
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
25 | # our custom stuff
26 | .env
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/README.md:
--------------------------------------------------------------------------------
1 | # Unsplash Image Gallery
2 |
3 | **Important**: Make sure to add your own [Unsplash API Key](https://unsplash.com/developers) to a `.env` file.
4 |
5 | - Copy `.env.example` to `.env`
6 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-infinite-scroll-component": "^5.0.4",
12 | "react-scripts": "3.4.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A06 - Infinite Image Gallery/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A06 - Infinite Image Gallery/finished/public/logo192.png
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A06 - Infinite Image Gallery/finished/public/logo512.png
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/.env.example:
--------------------------------------------------------------------------------
1 | REACT_APP_UNSPLASH_ACCESS_KEY=myunsplashkeygoeshere
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
25 | # our custom stuff
26 | .env
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/README.md:
--------------------------------------------------------------------------------
1 | # Unsplash Image Gallery
2 |
3 | **Important**: Make sure to add your own [Unsplash API Key](https://unsplash.com/developers) to a `.env` file.
4 |
5 | - Copy `.env.example` to `.env`
6 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-infinite-scroll-component": "^5.0.4",
12 | "react-scripts": "3.4.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A06 - Infinite Image Gallery/start/public/favicon.ico
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A06 - Infinite Image Gallery/start/public/logo192.png
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A06 - Infinite Image Gallery/start/public/logo512.png
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | export default function App() {
5 | return (
6 |
7 |
Unsplash Image Gallery!
8 |
9 |
13 |
14 |
15 | {[...Array(100)].map((_, index) => (
16 |
17 |

18 |
19 | ))}
20 |
21 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/A06 - Infinite Image Gallery/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/README.md:
--------------------------------------------------------------------------------
1 | ## Trivia App
2 |
3 | We will pull trivia questions from [Open Trivia Database](https://opentdb.com) and use them to create a Trivia game.
4 |
5 | [View Demo](https://qlb3o.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348626-07-trivia/992056-00-trivia-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348626-07-trivia/992056-00-trivia-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - Fetching data from an API
12 | - Custom React Hooks
13 | - React state w/ useState()
14 | - Parent and child components
15 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "lodash.shuffle": "^4.2.0",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-scripts": "3.4.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A07 - Trivia Game/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A07 - Trivia Game/finished/public/logo192.png
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A07 - Trivia Game/finished/public/logo512.png
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/src/categories.js:
--------------------------------------------------------------------------------
1 | export default [
2 | {
3 | id: 'any',
4 | name: 'Any Category',
5 | },
6 | { id: 9, name: 'General Knowledge' },
7 | { id: 10, name: 'Entertainment: Books' },
8 | { id: 11, name: 'Entertainment: Film' },
9 | { id: 12, name: 'Entertainment: Music' },
10 | { id: 13, name: 'Entertainment: Musicals & Theatres' },
11 | { id: 14, name: 'Entertainment: Television' },
12 | { id: 15, name: 'Entertainment: Video Games' },
13 | { id: 16, name: 'Entertainment: Board Games' },
14 | { id: 17, name: 'Science & Nature' },
15 | { id: 18, name: 'Science: Computers' },
16 | { id: 19, name: 'Science: Mathematics' },
17 | { id: 20, name: 'Mythology' },
18 | { id: 21, name: 'Sports' },
19 | { id: 22, name: 'Geography' },
20 | { id: 23, name: 'History' },
21 | { id: 24, name: 'Politics' },
22 | { id: 25, name: 'Art' },
23 | { id: 26, name: 'Celebrities' },
24 | { id: 27, name: 'Animals' },
25 | { id: 28, name: 'Vehicles' },
26 | { id: 29, name: 'Entertainment: Comics' },
27 | { id: 30, name: 'Science: Gadgets' },
28 | { id: 31, name: 'Entertainment: Japanese Anime & Manga' },
29 | { id: 32, name: 'Entertainment: Cartoon & Animations' },
30 | ];
31 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/src/components/CategorySelector.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import categories from '../categories';
3 |
4 | export default function CategorySelector({ category, chooseCategory }) {
5 | return (
6 |
7 |
Select Category
8 |
17 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/src/components/Question.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import shuffle from 'lodash.shuffle';
3 |
4 | export default function Question({ question, answerQuestion }) {
5 | const answers = shuffle([
6 | ...question.incorrect_answers,
7 | question.correct_answer,
8 | ]);
9 |
10 | return (
11 |
12 |
13 |
14 | {answers.map((answer, index) => (
15 |
22 | );
23 | }
24 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/src/components/ResultModal.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function ResultModal({ isCorrect, question, getQuestion }) {
4 | return (
5 |
6 |
7 |
8 | {isCorrect && (
9 |
10 | 👊👊👊
11 |
12 | YOU WON!
13 |
14 | )}
15 |
16 | {!isCorrect && (
17 |
18 | 😟😢😟
19 |
20 | YOU LOST!
21 |
22 | )}
23 |
24 | {!isCorrect && (
25 |
26 | The correct answer was:
27 |
28 |
31 |
32 | )}
33 |
34 |
35 |
36 |
37 | );
38 | }
39 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/src/components/Scoreboard.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 |
3 | export default function Scoreboard({ isCorrect }) {
4 | const [correct, setCorrect] = useState(0);
5 | const [wrong, setWrong] = useState(0);
6 |
7 | useEffect(() => {
8 | if (isCorrect === null) return;
9 |
10 | if (isCorrect) setCorrect((score) => score + 1);
11 | else setWrong((score) => score + 1);
12 | }, [isCorrect]);
13 |
14 | return (
15 |
16 |
17 | {wrong}
18 | wrong
19 |
20 |
21 | {correct}
22 | correct
23 |
24 |
25 | );
26 | }
27 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/finished/src/useTrivia.js:
--------------------------------------------------------------------------------
1 | import { useState, useEffect, useCallback } from 'react';
2 |
3 | export default function useTrivia() {
4 | const [question, setQuestion] = useState(null);
5 | const [category, setCategory] = useState('any');
6 |
7 | const getQuestion = useCallback(() => {
8 | let url = 'https://opentdb.com/api.php?amount=1';
9 | if (category !== 'any') url += `&category=${category}`;
10 |
11 | fetch(url)
12 | .then((res) => res.json())
13 | .then((data) => setQuestion(data.results[0]));
14 | }, [category]);
15 |
16 | useEffect(() => {
17 | getQuestion();
18 | }, [getQuestion, category]);
19 |
20 | return { question, category, setCategory, getQuestion };
21 | }
22 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A07 - Trivia Game/start/public/favicon.ico
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A07 - Trivia Game/start/public/logo192.png
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A07 - Trivia Game/start/public/logo512.png
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Question from './components/Question';
3 | import CategorySelector from './components/CategorySelector';
4 | import ResultModal from './components/ResultModal';
5 | import Scoreboard from './components/Scoreboard';
6 | import './App.css';
7 |
8 | export default function App() {
9 | return (
10 |
11 | {/* show the result modal ----------------------- */}
12 | {/*
*/}
13 |
14 | {/* question header ----------------------- */}
15 |
16 |
17 |
18 |
19 |
20 | {/* the question itself ----------------------- */}
21 |
22 |
23 |
24 |
25 | {/* question footer ----------------------- */}
26 |
27 |
28 |
29 |
30 | );
31 | }
32 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/src/categories.js:
--------------------------------------------------------------------------------
1 | export default [
2 | {
3 | id: 'any',
4 | name: 'Any Category',
5 | },
6 | { id: 9, name: 'General Knowledge' },
7 | { id: 10, name: 'Entertainment: Books' },
8 | { id: 11, name: 'Entertainment: Film' },
9 | { id: 12, name: 'Entertainment: Music' },
10 | { id: 13, name: 'Entertainment: Musicals & Theatres' },
11 | { id: 14, name: 'Entertainment: Television' },
12 | { id: 15, name: 'Entertainment: Video Games' },
13 | { id: 16, name: 'Entertainment: Board Games' },
14 | { id: 17, name: 'Science & Nature' },
15 | { id: 18, name: 'Science: Computers' },
16 | { id: 19, name: 'Science: Mathematics' },
17 | { id: 20, name: 'Mythology' },
18 | { id: 21, name: 'Sports' },
19 | { id: 22, name: 'Geography' },
20 | { id: 23, name: 'History' },
21 | { id: 24, name: 'Politics' },
22 | { id: 25, name: 'Art' },
23 | { id: 26, name: 'Celebrities' },
24 | { id: 27, name: 'Animals' },
25 | { id: 28, name: 'Vehicles' },
26 | { id: 29, name: 'Entertainment: Comics' },
27 | { id: 30, name: 'Science: Gadgets' },
28 | { id: 31, name: 'Entertainment: Japanese Anime & Manga' },
29 | { id: 32, name: 'Entertainment: Cartoon & Animations' },
30 | ];
31 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/src/components/CategorySelector.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import categories from '../categories';
3 |
4 | export default function CategorySelector() {
5 | return (
6 |
7 |
Select Category
8 |
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/src/components/Question.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const sampleAnswers = ['One', 'Two', 'Three', 'Four'];
4 |
5 | export default function Question() {
6 | return (
7 |
8 |
Question Here
9 |
10 | {sampleAnswers.map((answer, index) => (
11 |
12 | ))}
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/src/components/ResultModal.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function ResultModal() {
4 | return (
5 |
6 |
7 |
8 |
9 | 👊👊👊
10 |
11 | YOU WON!
12 |
13 |
14 |
15 | 😟😢😟
16 |
17 | YOU LOST!
18 |
19 |
20 |
21 | The correct answer was:
22 |
23 | Answer here
24 |
25 |
26 |
27 |
28 |
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/src/components/Scoreboard.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function Scoreboard() {
4 | return (
5 |
6 |
7 | 0
8 | wrong
9 |
10 |
11 | 0
12 | correct
13 |
14 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/A07 - Trivia Game/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A08 - Authentication/README.md:
--------------------------------------------------------------------------------
1 | ## Authentication
2 |
3 | We'll handle authentication (something many production apps need). We'll integrate with [Auth0](https://auth0.com/).
4 |
5 | No demo because CodeSandbox doesn't work with Auth0 - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348627-08-authentication/992048-00-authentication-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348627-08-authentication/992048-00-authentication-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React Context
12 | - React state w/ useState()
13 | - React effects w/ useEffect()
14 | - Custom React Hook
15 | - React Router
16 | - Protecting certain routes
17 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@auth0/auth0-spa-js": "^1.8.1",
7 | "@testing-library/jest-dom": "^4.2.4",
8 | "@testing-library/react": "^9.3.2",
9 | "@testing-library/user-event": "^7.1.2",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-router-dom": "^5.1.2",
13 | "react-scripts": "3.4.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A08 - Authentication/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/finished/public/logo192.png
--------------------------------------------------------------------------------
/A08 - Authentication/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/finished/public/logo512.png
--------------------------------------------------------------------------------
/A08 - Authentication/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/components/PrivateRoute.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Route } from 'react-router-dom';
3 | import { useAuth0 } from '../contexts/auth0-context';
4 |
5 | export default function PrivateRoute({ children, ...rest }) {
6 | const { isAuthenticated, user, login } = useAuth0();
7 |
8 | if (!isAuthenticated && !user) {
9 | return login();
10 | }
11 |
12 | return {children};
13 | }
14 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/components/SiteHeader.js:
--------------------------------------------------------------------------------
1 | import React, { useContext } from 'react';
2 | import { Link } from 'react-router-dom';
3 | import { Auth0Context } from '../contexts/auth0-context';
4 |
5 | export default function SiteHeader() {
6 | const { isAuthenticated, login, logout, user } = useContext(Auth0Context);
7 |
8 | return (
9 |
10 | {/* stuff on the left */}
11 |
12 | Home
13 | Dashboard
14 |
15 |
16 | {/* stuff on the right */}
17 |
18 | {!isAuthenticated && }
19 | {isAuthenticated && user && (
20 | <>
21 |
22 |
23 | >
24 | )}
25 |
26 |
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/img/frodo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/finished/src/img/frodo.png
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/img/gandalf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/finished/src/img/gandalf.png
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/img/gollum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/finished/src/img/gollum.png
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 | import { Auth0Provider } from './contexts/auth0-context';
5 |
6 | ReactDOM.render(
7 |
8 |
9 |
10 |
11 | ,
12 | document.getElementById('root')
13 | );
14 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/pages/Dashboard.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Frodo from '../img/frodo.png';
3 |
4 | export default function Dashboard() {
5 | return (
6 |
7 |
8 |

9 |
Welcome Persom
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/A08 - Authentication/finished/src/pages/Home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Gandalf from '../img/gandalf.png';
3 |
4 | export default function Home() {
5 | return (
6 |
7 |
8 |

9 |
You Shall Not Pass!!!
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-router-dom": "^5.1.2",
12 | "react-scripts": "3.4.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/start/public/favicon.ico
--------------------------------------------------------------------------------
/A08 - Authentication/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/start/public/logo192.png
--------------------------------------------------------------------------------
/A08 - Authentication/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/start/public/logo512.png
--------------------------------------------------------------------------------
/A08 - Authentication/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
3 | import SiteHeader from './components/SiteHeader';
4 | import Dashboard from './pages/Dashboard';
5 | import Home from './pages/Home';
6 | import './App.css';
7 |
8 | export default function App() {
9 | return (
10 |
11 |
12 | {/* site header */}
13 |
14 |
15 | {/* routes */}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/components/SiteHeader.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'react-router-dom';
3 |
4 | export default function SiteHeader() {
5 | return (
6 |
7 | {/* stuff on the left */}
8 |
9 | Home
10 | Dashboard
11 |
12 |
13 | {/* stuff on the right */}
14 |
15 |
16 |
17 |
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/img/frodo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/start/src/img/frodo.png
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/img/gandalf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/start/src/img/gandalf.png
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/img/gollum.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A08 - Authentication/start/src/img/gollum.png
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/pages/Dashboard.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Frodo from '../img/frodo.png';
3 |
4 | export default function Dashboard() {
5 | return (
6 |
7 |
8 |

9 |
Welcome Persom
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/A08 - Authentication/start/src/pages/Home.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Gandalf from '../img/gandalf.png';
3 |
4 | export default function Home() {
5 | return (
6 |
7 |
8 |

9 |
You Shall Not Pass!!!
10 |
11 |
12 | );
13 | }
14 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/README.md:
--------------------------------------------------------------------------------
1 | ## Speech Timers
2 |
3 | We'll use the browser's [SpeechSynthesis API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis) to create a timer that speaks to us.
4 |
5 | [View Demo](https://4jfqj.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348628-09-web-speech-and-timers/992042-00-web-speech-and-timers-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348628-09-web-speech-and-timers/992042-00-web-speech-and-timers-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - Creating timers
12 | - Browser SpeechSyntesis API
13 | - Nested forms
14 | - Custom React Hooks
15 | - React state w/ useState()
16 | - React effects w/ useEffect()
17 | - Parent and child components
18 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1",
12 | "react-speech-kit": "^2.0.5",
13 | "react-timer-hook": "^2.0.2"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A09 - Web Speech and Timers/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A09 - Web Speech and Timers/finished/public/logo192.png
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A09 - Web Speech and Timers/finished/public/logo512.png
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A09 - Web Speech and Timers/start/public/favicon.ico
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A09 - Web Speech and Timers/start/public/logo192.png
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A09 - Web Speech and Timers/start/public/logo512.png
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | export default function App() {
5 | return (
6 |
7 |
Talk the Talk
8 |
9 |
10 | {/* timers go here */}
11 |
15 |
16 |
17 |
18 |
19 | {/* seconds */}
20 |
0
21 |
22 | {/* buttons */}
23 |
24 |
25 |
26 |
27 |
28 | );
29 | }
30 |
--------------------------------------------------------------------------------
/A09 - Web Speech and Timers/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/README.md:
--------------------------------------------------------------------------------
1 | ## Calendar Picker
2 |
3 | Let's build a calendar picker and use some logic to handle choosing a start and end time. We'll also style this with [styled-components](https://styled-components.com/).
4 |
5 | [View Demo](https://d4vfr.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348629-10-calendar-picker/992041-00-calendar-picker-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-a/348629-10-calendar-picker/992041-00-calendar-picker-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - CSS-in-JS: styled-components
12 | - React state w/ useState()
13 | - Component communication
14 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1",
12 | "styled-components": "^5.1.0"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A10 - Calendar Picker/finished/public/favicon.ico
--------------------------------------------------------------------------------
/A10 - Calendar Picker/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A10 - Calendar Picker/finished/public/logo192.png
--------------------------------------------------------------------------------
/A10 - Calendar Picker/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A10 - Calendar Picker/finished/public/logo512.png
--------------------------------------------------------------------------------
/A10 - Calendar Picker/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A10 - Calendar Picker/start/public/favicon.ico
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A10 - Calendar Picker/start/public/logo192.png
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/A10 - Calendar Picker/start/public/logo512.png
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | const calendarDates = Array(31)
5 | .fill(0)
6 | .map((e, i) => i);
7 |
8 | export default function App() {
9 | return (
10 | <>
11 |
12 |
15 |
18 |
19 |
20 |
21 | {calendarDates.map((day, index) => {
22 | return
{day + 1}
;
23 | })}
24 |
25 | >
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/A10 - Calendar Picker/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/README.md:
--------------------------------------------------------------------------------
1 | ## Chat Box
2 |
3 | We'll build the animated chat box that is on the home page of [20ReactApps.com](https://MakeReactApps.com?utm_source=github.com&utm_medium=readme).
4 |
5 | [View Demo](https://9lrdz.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365601-1-animated-chat-box/1041046-00-chat-box-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365601-1-animated-chat-box/1041046-00-chat-box-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React state w/ useState()
12 | - Timers
13 | - Animating React
14 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chat-box",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "@use-it/interval": "^0.1.3",
10 | "framer-motion": "^1.11.0",
11 | "react": "^16.13.1",
12 | "react-dom": "^16.13.1",
13 | "react-scripts": "3.4.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B01 - Animated Chat Box/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B01 - Animated Chat Box/finished/public/logo192.png
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B01 - Animated Chat Box/finished/public/logo512.png
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "chat-box",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B01 - Animated Chat Box/start/public/favicon.ico
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B01 - Animated Chat Box/start/public/logo192.png
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B01 - Animated Chat Box/start/public/logo512.png
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | const messages = [
5 | { text: 'How do I get better at React?' },
6 | { text: 'Just build something!' },
7 | { text: 'OK! What should I build?' },
8 | { text: 'Iono. Just Google it?' },
9 | { text: 'Oh! This course looks cool!' },
10 | { text: 'Send me the link?!' },
11 | { text: '20ReactApps.com!' },
12 | ];
13 |
14 | export default function App() {
15 | return (
16 |
17 |
18 | {messages.map((message, index) => {
19 | return (
20 |
21 | {message.text}
22 |
23 | );
24 | })}
25 |
26 |
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/B01 - Animated Chat Box/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/README.md:
--------------------------------------------------------------------------------
1 | ## Multi-Step Form
2 |
3 | We'll use React Context to manage state for multiple forms across multiple steps. We'll also animate the views.
4 |
5 | [View Demo](https://hbkbf.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365602-2-multi-step-form/1041044-00-multi-step-form-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365602-2-multi-step-form/1041044-00-multi-step-form-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React Context
12 | - React state w/ useState()
13 | - React effects w/ useEffect()
14 | - Custom React Hook
15 | - React Router
16 | - Animating React
17 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "multi-step-form",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "framer-motion": "^1.11.0",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-hook-form": "^5.7.2",
13 | "react-router-dom": "^5.2.0",
14 | "react-scripts": "3.4.1"
15 | },
16 | "scripts": {
17 | "start": "react-scripts start",
18 | "build": "react-scripts build",
19 | "test": "react-scripts test",
20 | "eject": "react-scripts eject"
21 | },
22 | "eslintConfig": {
23 | "extends": "react-app"
24 | },
25 | "browserslist": {
26 | "production": [
27 | ">0.2%",
28 | "not dead",
29 | "not op_mini all"
30 | ],
31 | "development": [
32 | "last 1 chrome version",
33 | "last 1 firefox version",
34 | "last 1 safari version"
35 | ]
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B02 - Multi-Step Form/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B02 - Multi-Step Form/finished/public/logo192.png
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B02 - Multi-Step Form/finished/public/logo512.png
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { BrowserRouter as Router } from 'react-router-dom';
3 | import SignupForm from './components/SignupForm/SignupForm';
4 | import './App.css';
5 |
6 | export default function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/src/components/SignupForm/3Review.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useSignupForm } from './SignupFormContext';
3 | import Animator from './Animator';
4 |
5 | export default function Review() {
6 | const { profile, social } = useSignupForm();
7 |
8 | function handleSubmit(e) {
9 | e.preventDefault();
10 | alert('you are submitting! congrats!');
11 | }
12 |
13 | return (
14 |
15 |
33 |
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/src/components/SignupForm/Animator.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { motion } from 'framer-motion';
3 |
4 | export default function Animator({ children }) {
5 | return (
6 |
12 | {children}
13 |
14 | );
15 | }
16 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/src/components/SignupForm/SignupForm.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Switch, Route, useLocation } from 'react-router-dom';
3 | import { AnimatePresence, motion } from 'framer-motion';
4 | import ProfileForm from './1ProfileForm';
5 | import SocialForm from './2SocialForm';
6 | import Review from './3Review';
7 | import StepLinks from './StepLinks';
8 | import { SignupFormProvider } from './SignupFormContext';
9 |
10 | export default function SignupForm() {
11 | const location = useLocation();
12 |
13 | return (
14 |
15 |
16 | {/* show the steps and links */}
17 |
18 |
19 | {/* show the forms */}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/src/components/SignupForm/SignupFormContext.js:
--------------------------------------------------------------------------------
1 | import React, { createContext, useContext, useState } from 'react';
2 |
3 | export const SignupFormContext = createContext();
4 | export const useSignupForm = () => useContext(SignupFormContext);
5 |
6 | export function SignupFormProvider({ children }) {
7 | const [profile, setProfile] = useState({});
8 | const [social, setSocial] = useState({});
9 |
10 | return (
11 |
14 | {children}
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/src/components/SignupForm/StepLinks.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { NavLink } from 'react-router-dom';
3 | import { useSignupForm } from './SignupFormContext';
4 |
5 | function isEmpty(obj) {
6 | return Object.keys(obj).length === 0;
7 | }
8 |
9 | export default function StepLinks() {
10 | const { profile, social } = useSignupForm();
11 |
12 | // if profile is empty
13 | // if social object is empty
14 | const isProfileDone = !isEmpty(profile);
15 | const isSocialDone = !isEmpty(social);
16 |
17 | return (
18 |
19 |
20 | {isProfileDone ? '❤️' : '🤍'} Profile
21 |
22 |
23 | {isProfileDone ? (
24 |
25 | {isSocialDone ? '❤️' : '🤍'} Social
26 |
27 | ) : (
28 |
29 | Social
30 |
31 | )}
32 |
33 | {isProfileDone && isSocialDone ? (
34 |
35 | Review
36 |
37 | ) : (
38 |
39 | Review
40 |
41 | )}
42 |
43 | );
44 | }
45 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "multi-step-form",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B02 - Multi-Step Form/start/public/favicon.ico
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B02 - Multi-Step Form/start/public/logo192.png
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B02 - Multi-Step Form/start/public/logo512.png
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | export default function App() {
5 | return Signup form goes here
;
6 | }
7 |
--------------------------------------------------------------------------------
/B02 - Multi-Step Form/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/README.md:
--------------------------------------------------------------------------------
1 | ## Memory Matching
2 |
3 | Build a memory matching game using Pokemon. Lot of fun!
4 |
5 | [View Demo](https://0dsop.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365603-3-memory-matching-game/1041042-00-memory-matching-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365603-3-memory-matching-game/1041042-00-memory-matching-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React state w/ useState()
12 | - A lot of React effects w/ useEffect()
13 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "memory-matching",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "lodash.shuffle": "^4.2.0",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-scripts": "3.4.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B03 - Memory Matching Game/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B03 - Memory Matching Game/finished/public/logo192.png
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B03 - Memory Matching Game/finished/public/logo512.png
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "memory-matching",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "lodash.shuffle": "^4.2.0",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-scripts": "3.4.1"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B03 - Memory Matching Game/start/public/favicon.ico
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B03 - Memory Matching Game/start/public/logo192.png
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B03 - Memory Matching Game/start/public/logo512.png
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | // image for the pokemon
5 | // https://pokeres.bastionbot.org/images/pokemon/${pokemon.id}.png
6 |
7 | const pokemon = [
8 | { id: 4, name: 'charizard' },
9 | { id: 10, name: 'caterpie' },
10 | { id: 77, name: 'ponyta' },
11 | { id: 108, name: 'lickitung' },
12 | { id: 132, name: 'ditto' },
13 | { id: 133, name: 'eevee' },
14 | ];
15 |
16 | export default function App() {
17 | return ;
18 | }
19 |
--------------------------------------------------------------------------------
/B03 - Memory Matching Game/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/README.md:
--------------------------------------------------------------------------------
1 | ## Drag and Drop Math Card
2 |
3 | We'll use [React Drag and Drop](https://react-dnd.github.io/react-dnd/about) to create a math card.
4 |
5 | [View Demo](https://sj1bd.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365604-4-drag-and-drop-math-card/1041039-00-drag-and-drop-math-card-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365604-4-drag-and-drop-math-card/1041039-00-drag-and-drop-math-card-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React Drag and Drop
12 | - React state w/ useState()
13 | - React effects w/ useEffect()
14 | - Advanced component communication
15 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "drag-and-drop-math-card",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dnd": "^11.1.3",
11 | "react-dnd-html5-backend": "^11.1.3",
12 | "react-dom": "^16.13.1",
13 | "react-scripts": "3.4.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B04 - Drag and Drop Math Card/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B04 - Drag and Drop Math Card/finished/public/logo192.png
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B04 - Drag and Drop Math Card/finished/public/logo512.png
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "drag-and-drop-math-card",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B04 - Drag and Drop Math Card/start/public/favicon.ico
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B04 - Drag and Drop Math Card/start/public/logo192.png
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B04 - Drag and Drop Math Card/start/public/logo512.png
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | export default function App() {
5 | return (
6 |
7 | {/* math card */}
8 |
9 |
1
10 |
1
11 |
+
12 |
2
13 |
14 |
15 |
16 |
17 | {Array(10)
18 | .fill(0)
19 | .map((n, i) => (
20 |
21 | {i + 1}
22 |
23 | ))}
24 |
25 |
26 |
27 | {['*', '-', '+', '/'].map((o, i) => (
28 |
29 | {o}
30 |
31 | ))}
32 |
33 |
34 |
35 | );
36 | }
37 |
--------------------------------------------------------------------------------
/B04 - Drag and Drop Math Card/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B05 - Browser/README.md:
--------------------------------------------------------------------------------
1 | ## Browser w/ iframes
2 |
3 | Let's build a mini browser that will show the url that we type.
4 |
5 | [View Demo](https://e7ws4.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365605-5-browser/1041032-00-browser-browser-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365605-5-browser/1041032-00-browser-browser-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - React reducer w/ useReducer()
12 | - React state w/ useState()
13 | - iframes
14 |
--------------------------------------------------------------------------------
/B05 - Browser/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/B05 - Browser/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.0",
11 | "react-hook-form": "^5.1.1",
12 | "react-scripts": "3.4.0"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/B05 - Browser/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B05 - Browser/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B05 - Browser/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B05 - Browser/finished/public/logo192.png
--------------------------------------------------------------------------------
/B05 - Browser/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B05 - Browser/finished/public/logo512.png
--------------------------------------------------------------------------------
/B05 - Browser/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B05 - Browser/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B05 - Browser/finished/src/components/AddressBar.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 |
3 | function addHttps(url) {
4 | if (!url.startsWith('http') || !url.startsWith('https')) {
5 | return `https://${url}`;
6 | }
7 |
8 | return url;
9 | }
10 |
11 | export default function AddressBar({ update, url }) {
12 | const [value, setValue] = useState(url || '');
13 |
14 | useEffect(() => {
15 | setValue(url);
16 | }, [url]);
17 |
18 | function handleSubmit(e) {
19 | e.preventDefault();
20 | // check for https
21 | const httpsUrl = addHttps(value);
22 | update(httpsUrl);
23 | }
24 |
25 | return (
26 |
27 |
35 |
36 | );
37 | }
38 |
--------------------------------------------------------------------------------
/B05 - Browser/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B05 - Browser/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/B05 - Browser/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.0",
11 | "react-hook-form": "^5.1.1",
12 | "react-scripts": "3.4.0"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/B05 - Browser/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B05 - Browser/start/public/favicon.ico
--------------------------------------------------------------------------------
/B05 - Browser/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B05 - Browser/start/public/logo192.png
--------------------------------------------------------------------------------
/B05 - Browser/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B05 - Browser/start/public/logo512.png
--------------------------------------------------------------------------------
/B05 - Browser/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B05 - Browser/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B05 - Browser/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Tabs from './components/Tabs';
3 | import AddressBar from './components/AddressBar';
4 | import './App.css';
5 |
6 | export default function App() {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | <>New Tab Page>
16 |
17 |
18 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/B05 - Browser/start/src/components/AddressBar.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function AddressBar() {
4 | return (
5 |
6 |
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/B05 - Browser/start/src/components/Tabs.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 |
3 | export default function Tabs() {
4 | return (
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | );
14 | }
15 |
16 | function Tab({ index, children, close, isActive }) {
17 | const [highlightStyle, setHighlightStyle] = useState({
18 | left: 0,
19 | });
20 |
21 | function moveHighlight(e) {
22 | setHighlightStyle({
23 | opacity: 0.4,
24 | left: e.nativeEvent.layerX - 250,
25 | });
26 | }
27 |
28 | function hideHighlight(e) {
29 | setHighlightStyle({ opacity: 0, left: e.nativeEvent.layerX - 250 });
30 | }
31 |
32 | return (
33 |
38 |
39 | {children}
40 | {close && (
41 |
44 | )}
45 |
46 | );
47 | }
48 |
--------------------------------------------------------------------------------
/B05 - Browser/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/README.md:
--------------------------------------------------------------------------------
1 | ## Real-Time Search
2 |
3 | We will use [Algolia](https://www.algolia.com/), a popular tool, to add real-time search to our React apps.
4 |
5 | [View Demo](https://707yr.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365606-6-real-time-search/1041031-00-real-time-search-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365606-6-real-time-search/1041031-00-real-time-search-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - Using Algolia for real-time search
12 | - Using 3rd party packages
13 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "algoliasearch": "^4.3.0",
10 | "react": "^16.13.1",
11 | "react-dom": "^16.13.1",
12 | "react-instantsearch-dom": "^6.6.0",
13 | "react-scripts": "3.4.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B06 - Real-Time Search/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B06 - Real-Time Search/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B06 - Real-Time Search/finished/public/logo192.png
--------------------------------------------------------------------------------
/B06 - Real-Time Search/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B06 - Real-Time Search/finished/public/logo512.png
--------------------------------------------------------------------------------
/B06 - Real-Time Search/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "finished",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B06 - Real-Time Search/start/public/favicon.ico
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B06 - Real-Time Search/start/public/logo192.png
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B06 - Real-Time Search/start/public/logo512.png
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | // ===== OPTION 1: if you want to create your own algolia account and fill it with data =====
5 | // demo data: https://www.algolia.com/doc/guides/building-search-ui/resources/demos/react/#media
6 | // sample datasets on github: https://github.com/algolia/datasets
7 |
8 | // ===== OPTION 2: if you want to get started quickly =====
9 | // app id: SSN9CKZUJ2
10 | // api key: ae8a3f7cff93d40282a4831930bfa38b
11 | // index name: products
12 |
13 | export default function App() {
14 | return (
15 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/B06 - Real-Time Search/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/README.md:
--------------------------------------------------------------------------------
1 | ## Charting the Weather
2 |
3 | We will use two different APIs to create a weather chart.
4 |
5 | [View Demo](https://v2dmf.csb.app/) - [Watch a Preview](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365607-7-charting-the-weather/1041029-00-weather-chart-preview) - [Buy the Course](https://MakeReactApps.com/?utm_source=github.com&utm_medium=readme)
6 |
7 | [](https://learn.chrisoncode.io/courses/10-react-apps-series-b/365607-7-charting-the-weather/1041029-00-weather-chart-preview)
8 |
9 | ### React skills used in this app
10 |
11 | - Using Google APIs
12 | - Using a Weather API
13 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "charting-graphs",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B07 - Chart the Weather/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B07 - Chart the Weather/finished/public/logo192.png
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B07 - Chart the Weather/finished/public/logo512.png
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/src/App.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | body {
6 | min-height: 100vh;
7 | display: flex;
8 | align-items: center;
9 | justify-content: center;
10 | background: #e9dbc9;
11 | background-image: url('https://images.unsplash.com/photo-1531147646552-1eec68116469?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3450&q=80');
12 | background-position: center bottom;
13 | background-size: cover;
14 | }
15 |
16 | .app {
17 | background: #e20174;
18 | border-radius: 10px;
19 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
20 | padding: 0 0 30px;
21 | text-align: center;
22 | width: 500px;
23 | min-height: 300px;
24 | margin: 0 auto;
25 | }
26 |
27 | form {
28 | margin-bottom: 50px;
29 | }
30 |
31 | input {
32 | font-size: 22px;
33 | width: 100%;
34 | border: none;
35 | outline: none;
36 | background: #fff;
37 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
38 | padding: 25px 30px;
39 | border-radius: 10px 10px 0 0;
40 | }
41 |
42 | input:focus,
43 | input:active {
44 | box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
45 | 0 4px 6px -2px rgba(0, 0, 0, 0.05);
46 | }
47 |
48 | .chart {
49 | padding: 0 30px 30px;
50 | }
51 |
52 | canvas {
53 | }
54 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 | import GeoForm from './components/GeoForm';
3 | import WeatherChart from './components/WeatherChart';
4 | import './App.css';
5 |
6 | export default function App() {
7 | const [latLng, setLatLng] = useState(null);
8 |
9 | return (
10 |
11 | {/* form goes here */}
12 |
13 |
14 | {/* chart goes here */}
15 | {latLng && }
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/src/components/GeoForm.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect, useCallback } from 'react';
2 | import Geocode from 'react-geocode';
3 |
4 | Geocode.setApiKey('AIzaSyDp4os33WF6-4d-xFVyL0HsUUHN7dOml_w');
5 |
6 | // all things with address + lat+long go into a component
7 | export default function GeoForm({ setLatLng }) {
8 | const [value, setValue] = useState('Las Vegas');
9 |
10 | const getLatLng = useCallback((address) => {
11 | Geocode.fromAddress(address).then((response) => {
12 | const { lat, lng } = response.results[0].geometry.location;
13 |
14 | setLatLng({ lat, lng });
15 | });
16 | }, []);
17 |
18 | useEffect(() => {
19 | getLatLng(value);
20 | }, []);
21 |
22 | function handleSubmit(e) {
23 | e.preventDefault();
24 | getLatLng(value);
25 | }
26 |
27 | return (
28 |
35 | );
36 | }
37 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "charting-graphs",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-scripts": "3.4.1"
12 | },
13 | "scripts": {
14 | "start": "react-scripts start",
15 | "build": "react-scripts build",
16 | "test": "react-scripts test",
17 | "eject": "react-scripts eject"
18 | },
19 | "eslintConfig": {
20 | "extends": "react-app"
21 | },
22 | "browserslist": {
23 | "production": [
24 | ">0.2%",
25 | "not dead",
26 | "not op_mini all"
27 | ],
28 | "development": [
29 | "last 1 chrome version",
30 | "last 1 firefox version",
31 | "last 1 safari version"
32 | ]
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B07 - Chart the Weather/start/public/favicon.ico
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B07 - Chart the Weather/start/public/logo192.png
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B07 - Chart the Weather/start/public/logo512.png
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/src/App.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | body {
6 | min-height: 100vh;
7 | display: flex;
8 | align-items: center;
9 | justify-content: center;
10 | background: #e9dbc9;
11 | background-image: url('https://images.unsplash.com/photo-1531147646552-1eec68116469?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3450&q=80');
12 | background-position: center bottom;
13 | background-size: cover;
14 | }
15 |
16 | .app {
17 | background: #e20174;
18 | border-radius: 10px;
19 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
20 | padding: 0 0 30px;
21 | text-align: center;
22 | width: 500px;
23 | min-height: 300px;
24 | margin: 0 auto;
25 | }
26 |
27 | form {
28 | margin-bottom: 50px;
29 | }
30 |
31 | input {
32 | font-size: 22px;
33 | width: 100%;
34 | border: none;
35 | outline: none;
36 | background: #fff;
37 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
38 | padding: 25px 30px;
39 | border-radius: 10px 10px 0 0;
40 | }
41 |
42 | input:focus,
43 | input:active {
44 | box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
45 | 0 4px 6px -2px rgba(0, 0, 0, 0.05);
46 | }
47 |
48 | .chart {
49 | padding: 0 30px 30px;
50 | }
51 |
52 | canvas {
53 | }
54 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | // openweathermap.org
5 | // https://api.openweathermap.org/data/2.5/onecall?lat=33.441792&lon=-94.037689&exclude=hourly,minutely&units=imperial&appid=bb96c7f9ac6f57dc00333727c5407547
6 | // api key: bb96c7f9ac6f57dc00333727c5407547
7 |
8 | // google maps api
9 | // api key: AIzaSyDp4os33WF6-4d-xFVyL0HsUUHN7dOml_w
10 |
11 | export default function App() {
12 | return (
13 |
14 | {/* form goes here */}
15 | {/* chart goes here */}
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/B07 - Chart the Weather/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "shopping-cart",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-router-dom": "^5.2.0",
12 | "react-scripts": "3.4.1",
13 | "use-onclickoutside": "^0.3.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B08 - Shopping Cart/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B08 - Shopping Cart/finished/public/logo192.png
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B08 - Shopping Cart/finished/public/logo512.png
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Header from './components/Header';
3 | import products from './products';
4 | import Product from './components/Product';
5 | import { CartProvider } from './contexts/use-cart';
6 | import './App.css';
7 |
8 | export default function App() {
9 | return (
10 |
11 |
12 | {/* header */}
13 |
14 |
15 |
16 |
17 | {/* show products here */}
18 | {products.map((product, index) => (
19 |
20 | ))}
21 |
22 |
23 |
24 |
25 | );
26 | }
27 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/src/components/Cart.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useCart } from '../contexts/use-cart';
3 |
4 | export default function Cart() {
5 | // const { addItem, removeItem, totalPrice, cart } = useCart();
6 | const { addItem, removeItem, cartGroupedByItems, totalPrice } = useCart();
7 |
8 | return (
9 |
10 | {/* show cart items here */}
11 | {cartGroupedByItems.map((product, index) => (
12 |
13 |

14 |
15 |
16 |
{product.name}
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ))}
26 |
27 |
${totalPrice}
28 |
29 | );
30 | }
31 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/src/components/Header.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useRef } from 'react';
2 | import CartIcon from '../supermarket.svg';
3 | import useOnClickOutside from 'use-onclickoutside';
4 | import { useCart } from '../contexts/use-cart';
5 | import Cart from './Cart';
6 |
7 | export default function Header() {
8 | const { cart } = useCart();
9 |
10 | const modalRef = useRef(null);
11 | const [isOpen, setIsOpen] = useState(false);
12 |
13 | // close the modal if we click outside of it
14 | useOnClickOutside(modalRef, () => setIsOpen(false));
15 |
16 | return (
17 |
18 |
19 |
20 |
23 |
24 | {/* show a modal */}
25 |
30 |
31 |
32 |
33 |
34 |
35 | );
36 | }
37 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/src/components/Product.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { useCart } from '../contexts/use-cart';
3 |
4 | export default function Product({ product }) {
5 | const { addItem, removeItem, countItemsInCart } = useCart();
6 |
7 | return (
8 |
9 | {/* image */}
10 |

11 |
12 | {/* product name */}
13 |
{product.name}
14 |
15 | {/* buttons */}
16 |
17 | {/* remove */}
18 | {countItemsInCart(product.sku) > 0 ? (
19 |
22 | ) : (
23 |
24 | )}
25 |
26 | {/* add */}
27 |
30 |
31 |
32 | );
33 | }
34 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/finished/src/products.js:
--------------------------------------------------------------------------------
1 | // hard coding in products right here. you would most likely grab these from an api
2 | export default [
3 | {
4 | sku: 123,
5 | name: 'Occupy Mars Shirt',
6 | image_url: 'https://i.imgur.com/dHzSCmK.png',
7 | price: 20,
8 | },
9 | {
10 | sku: 456,
11 | name: 'Starman Shirt',
12 | image_url: 'https://i.imgur.com/uKxQCRX.png',
13 | price: 30,
14 | },
15 | {
16 | sku: 789,
17 | name: 'Crew Dragon Shirt',
18 | image_url: 'https://i.imgur.com/5X6jmXs.png',
19 | price: 40,
20 | },
21 | {
22 | sku: 1011,
23 | name: 'Ripley Shirt',
24 | image_url: 'https://i.imgur.com/eeZ3FQE.png',
25 | price: 50,
26 | },
27 | ];
28 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "shopping-cart",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-dom": "^16.13.1",
11 | "react-router-dom": "^5.2.0",
12 | "react-scripts": "3.4.1",
13 | "use-onclickoutside": "^0.3.1"
14 | },
15 | "scripts": {
16 | "start": "react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B08 - Shopping Cart/start/public/favicon.ico
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B08 - Shopping Cart/start/public/logo192.png
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B08 - Shopping Cart/start/public/logo512.png
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Header from './components/Header';
3 | import products from './products';
4 | import './App.css';
5 |
6 | export default function App() {
7 | return (
8 |
9 | {/* header */}
10 |
11 |
12 |
13 | {/* show products here */}
14 |
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/src/components/Cart.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function Cart() {
4 | return (
5 |
6 | {/* show cart items here */}
7 |
8 |
$100
9 |
10 | );
11 | }
12 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/src/components/Header.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import CartIcon from '../supermarket.svg';
3 |
4 | export default function Header() {
5 | return (
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById('root')
10 | );
11 |
--------------------------------------------------------------------------------
/B08 - Shopping Cart/start/src/products.js:
--------------------------------------------------------------------------------
1 | // hard coding in products right here. you would most likely grab these from an api
2 | export default [
3 | {
4 | sku: 123,
5 | name: 'Occupy Mars Shirt',
6 | image_url: 'https://i.imgur.com/dHzSCmK.png',
7 | price: 20,
8 | },
9 | {
10 | sku: 456,
11 | name: 'Starman Shirt',
12 | image_url: 'https://i.imgur.com/uKxQCRX.png',
13 | price: 30,
14 | },
15 | {
16 | sku: 789,
17 | name: 'Crew Dragon Shirt',
18 | image_url: 'https://i.imgur.com/5X6jmXs.png',
19 | price: 40,
20 | },
21 | {
22 | sku: 1011,
23 | name: 'Ripley Shirt',
24 | image_url: 'https://i.imgur.com/eeZ3FQE.png',
25 | price: 50,
26 | },
27 | ];
28 |
--------------------------------------------------------------------------------
/B09 - Typing Test/finished/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "typing-test",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-countdown-hook": "^1.0.1",
11 | "react-dom": "^16.13.1",
12 | "react-scripts": "3.4.3"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/B09 - Typing Test/finished/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B09 - Typing Test/finished/public/favicon.ico
--------------------------------------------------------------------------------
/B09 - Typing Test/finished/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B09 - Typing Test/finished/public/logo192.png
--------------------------------------------------------------------------------
/B09 - Typing Test/finished/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B09 - Typing Test/finished/public/logo512.png
--------------------------------------------------------------------------------
/B09 - Typing Test/finished/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B09 - Typing Test/finished/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B09 - Typing Test/finished/src/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 | import App from "./App";
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById("root")
10 | );
11 |
--------------------------------------------------------------------------------
/B09 - Typing Test/start/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "typing-test",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.3.2",
8 | "@testing-library/user-event": "^7.1.2",
9 | "react": "^16.13.1",
10 | "react-countdown-hook": "^1.0.1",
11 | "react-dom": "^16.13.1",
12 | "react-scripts": "3.4.3"
13 | },
14 | "scripts": {
15 | "start": "react-scripts start",
16 | "build": "react-scripts build",
17 | "test": "react-scripts test",
18 | "eject": "react-scripts eject"
19 | },
20 | "eslintConfig": {
21 | "extends": "react-app"
22 | },
23 | "browserslist": {
24 | "production": [
25 | ">0.2%",
26 | "not dead",
27 | "not op_mini all"
28 | ],
29 | "development": [
30 | "last 1 chrome version",
31 | "last 1 firefox version",
32 | "last 1 safari version"
33 | ]
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/B09 - Typing Test/start/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B09 - Typing Test/start/public/favicon.ico
--------------------------------------------------------------------------------
/B09 - Typing Test/start/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B09 - Typing Test/start/public/logo192.png
--------------------------------------------------------------------------------
/B09 - Typing Test/start/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chris-sev/make-react-apps/3b44ef24a5e24935da0d3f4f0b05b08848d2cd8c/B09 - Typing Test/start/public/logo512.png
--------------------------------------------------------------------------------
/B09 - Typing Test/start/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/B09 - Typing Test/start/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/B09 - Typing Test/start/src/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import './App.css';
3 |
4 | // to calculate typing speed
5 | // words typed / minutes
6 | // words typed = (characters - typos) / 5
7 |
8 | const secondsToCount = 10;
9 | const paragraph = `Coding is the best. We are able to build something from scratch. It is literally imagination incarnate. Solving our own problems through coding is one of the coolest things we could do!`;
10 |
11 | export default function App() {
12 | return (
13 |
14 | {/* sidebar */}
15 |
16 |
00
17 |
18 |
19 |
20 |
21 |
22 | {/* show the paragraph */}
23 |
{paragraph}
24 |
25 | {/* show the textarea */}
26 |
29 |
30 |
31 | );
32 | }
33 |
--------------------------------------------------------------------------------
/B09 - Typing Test/start/src/index.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 | import App from "./App";
4 |
5 | ReactDOM.render(
6 |
7 |
8 | ,
9 | document.getElementById("root")
10 | );
11 |
--------------------------------------------------------------------------------