An exercise-based minishop by Ben Ilegbodu to introduce the critical concepts needed for building modern React applications using hooks. Best if accompanied with live facilitation by me 🙂.
In order to maximize our time during the minishop, please complete the following tasks in advance:
- Set up the project (follow setup instructions below)
- Install and run Zoom on the computer you'll be developing with
- Install a JSX-friendly code editor, such as Visual Studio Code (w/ helpful extensions)
- Install React Developer Tools for Chrome (recommended) or Firefox
- Brush up on modern ES.next features, if they are unfamiliar to you
The more prepared you are for the minishop, the better it will go for you! 👍🏾
All of these must also be available in your PATH
in order to be run globally. To verify things are set up properly, run:
git --version
node --version
npm --version
If your node version is version 13 or lower, you can install nvm
to manage multiple versions of node.
If you have trouble with any of these, learn more about the PATH
environment variable and how to fix it here for Windows or Mac/Linux.
After you have verified that you have the proper tools installed (and at the proper versions), getting setup should be a breeze. Run the following commands:
git clone https://github.com/benmvp/zero-to-react-minishop.git
cd zero-to-react-minishop
npm run setup
This will likely take a few minutes to run. It will clone the repo, verify the environment, and install all of the JavaScript dependencies needed to build our app.
If it fails, please read through the error logs and see if you can figure out what the problem is. Double check that you have the proper system requirements installed. If you are unable to figure out the problem on your own, please feel free to file an issue with everything (and I mean everything) from the output of the commands you ran.
We will go through several exercises converting components written in classes to hooks. To get started and verify that everything has been installed correctly, run:
npm start
The app should pop up in your default browser running at http://localhost:3000/. The app should display an index page with links to the steps in the minishop.
For those interested, the app is a standard app bootstrapped by Create React App.
Let's learn about React! ⚛️
Hiya! 👋🏾 My name is Ben Ilegbodu. 😄
- Christian, Husband, Father of 3️⃣
- Pittsburg, California
- Principal Frontend Engineer at Stitch Fix (and yes we're hiring!)
- @benmvp
- www.benmvp.com
- Go Rockets! 🚀🏀
- Subscribe to the BenMVP Newsletter
Each step in the minishop contains exercises to apply what you just learned. The exercises are intended to be a lot, so don't worry if you don't finish them all during the step. However, there are also bonuses if you finish with time remaining.
If at any point you get stuck, you can find the answers in the answers/
directory of the step.
- 🛠️ Setup / Logistics / Intro
- Step 1 - JSX & Components
- Step 2 - State
- 😴 10 minutes
- Step 3 - Effects
- Step 4 - Lists & Conditionals
- ❓ Q & A
- Final Quiz!
- 👋🏾 Goodbye!
- Please interrupt me and ask questions! Others likely will have the same question.
- However, unrelated questions are better sent to Twitter or my AMA.
- Keep your video on (if possible) to make it feel more human and lively
- Keep your microphone muted unless your talking to avoid background noise distractions
- Answer each other's questions in the chat
- Use breakout rooms for help
Here is what you'll come away knowing at the end of the minishop...
- Defining function components (Step 1)
- Using JSX syntax (Step 1)
- Writing readable, reusable and composable components (Step 1)
- Rules of hooks (throughout)
- Maintaining component state with the
useState
hook (Step 2) - Handling HTML form elements (Step 2)
- Making API calls with the
useEffect
hook (Step 3) - Rendering dynamic lists of data (Step 4)
- Conditionally rendering components (Step 4)
Each step has an Elaboration & Feedback form link at the end. After you're done with the exercise and before jumping to the next step, please take a few minutes to fill out the form to solidify your learning.
At the end of the minishop, I would greatly appreciate your overall feedback. Share your minishop feedback.
All attendees, speakers, sponsors and volunteers at this minishop are required to agree with the code of conduct. Organizers will enforce this code throughout the event. We expect cooperation from all participants to help ensure a safe environment for everybody.
All of the minishop material is available for private, non-commercial use under the GPL version 3 license. If you would like to use this minishop to conduct your own minishop, please contact team@benmvp.com.
Go to Step 0 - Begin.