├── .gitignore
├── ApiSetup.md
├── README.md
├── license.md
├── package.json
├── postcss.config.js
├── public
├── favicon.ico
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
├── src
├── App.js
├── App.test.js
├── Components
│ ├── Footer.js
│ ├── Header.js
│ ├── HelloWorld.js
│ ├── Loader.js
│ ├── Navigation.js
│ ├── NavigationMenu.js
│ └── ProductCard.js
├── Hooks
│ └── HttpRequests.js
├── Images
│ ├── images-resource.png
│ ├── product-resource.png
│ └── resources.png
├── Views
│ ├── About.js
│ ├── Home.js
│ └── Product.js
├── index.css
├── index.js
├── logo.svg
├── serviceWorker.js
├── setupTests.js
└── tailwind.css
├── tailwind.config.js
└── yarn.lock
/.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 |
--------------------------------------------------------------------------------
/ApiSetup.md:
--------------------------------------------------------------------------------
1 | # Set up the API
2 |
3 | This project uses a [Mock API](https://mockapi.io/projects) to fake data.
4 |
5 | ## Here's what the resources look like
6 |
7 | **All Resouces**
8 | 
9 |
10 | **The product resource with custom description**
11 | 
12 |
13 | **The image resource with a custom imageUrl**
14 | 
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React JS for beginners
2 |
3 | This is a repository for my [free YouTube course on React JS for beginners](https://www.youtube.com/watch?v=HDEVMozZhv8&list=PL41lfR-6DnOoTiHU4Ub6efP-p3xAq3eiV).
4 |
5 | ### Support more free courses like this
6 | The courses I provide for free are competitive with many paid resources out there. If I can make $5000 monthly through your contributions below, then making videos can become my full time job, and I can help thousands more students get real world development experience with free resources just like this.
7 |
8 | * [Become a Patron](https://www.patreon.com/QuentinWatt)
9 |
10 | * [Join my YouTube channel](https://www.youtube.com/user/QuentinWatt/membership)
11 |
12 | ---
13 |
14 | ## Installation
15 |
16 | 1. Clone this project `git clone git@github.com:QuentinWatt/simple-react-boilerplate.git learn-react`
17 | 2. CD into the directory `cd learn-react`
18 | 3. Install all packages with `yarn` or `npm install`
19 | 4. Start the server with `yarn start`
20 | 5. Set up your own mock api using [these instructions](ApiSetup.md)
21 |
22 | ---
23 |
24 | ## Scripts available in this React Project
25 |
26 | In the project directory, you can run:
27 |
28 | ### `yarn start`
29 |
30 | Runs the app in the development mode.
31 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
32 |
33 | The page will reload if you make edits.
34 | You will also see any lint errors in the console.
35 |
36 | ### `yarn test`
37 |
38 | Launches the test runner in the interactive watch mode.
39 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
40 |
41 | ### `yarn build`
42 |
43 | Builds the app for production to the `build` folder.
44 | It correctly bundles React in production mode and optimizes the build for the best performance.
45 |
46 | The build is minified and the filenames include the hashes.
47 | Your app is ready to be deployed!
48 |
49 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
50 |
51 | ### `yarn eject`
52 |
53 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
54 |
55 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
56 |
57 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
58 |
59 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
60 |
61 | ## Learn More
62 |
63 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
64 |
65 | To learn React, check out the [React documentation](https://reactjs.org/).
66 |
67 | ### Code Splitting
68 |
69 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
70 |
71 | ### Analyzing the Bundle Size
72 |
73 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
74 |
75 | ### Making a Progressive Web App
76 |
77 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
78 |
79 | ### Advanced Configuration
80 |
81 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
82 |
83 | ### Deployment
84 |
85 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
86 |
87 | ### `yarn build` fails to minify
88 |
89 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
90 |
--------------------------------------------------------------------------------
/license.md:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2020-present Quentin Watt
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "learning-react",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@fortawesome/fontawesome-svg-core": "^1.2.28",
7 | "@fortawesome/free-solid-svg-icons": "^5.13.0",
8 | "@fortawesome/react-fontawesome": "^0.1.9",
9 | "@testing-library/jest-dom": "^4.2.4",
10 | "@testing-library/react": "^9.3.2",
11 | "@testing-library/user-event": "^7.1.2",
12 | "autoprefixer": "^9.7.5",
13 | "axios": "^0.19.2",
14 | "postcss-cli": "^7.1.0",
15 | "react": "^16.13.1",
16 | "react-dom": "^16.13.1",
17 | "react-router-dom": "^5.1.2",
18 | "react-scripts": "3.4.1",
19 | "react-spring": "^8.0.27",
20 | "tailwindcss": "^1.2.0"
21 | },
22 | "scripts": {
23 | "build:css": "postcss src/index.css -o src/tailwind.css",
24 | "watch:css": "postcss src/index.css -o src/tailwind.css -w",
25 | "start": "yarn build:css && react-scripts start",
26 | "build": "yarn build:css && react-scripts build",
27 | "test": "react-scripts test",
28 | "eject": "react-scripts eject"
29 | },
30 | "eslintConfig": {
31 | "extends": "react-app"
32 | },
33 | "browserslist": {
34 | "production": [
35 | ">0.2%",
36 | "not dead",
37 | "not op_mini all"
38 | ],
39 | "development": [
40 | "last 1 chrome version",
41 | "last 1 firefox version",
42 | "last 1 safari version"
43 | ]
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | require('tailwindcss'),
4 | require('autoprefixer'),
5 | ]
6 | }
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/QuentinWatt/React-for-beginners-tutorial-series/5c076b6b24c0d39150483ad49deb238781db91a0/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |