Skip to content

benmvp/zero-to-react-minishop

Repository files navigation

Zero to React with Hooks Minishop

Maintenance Status Build Status license PRs Welcome

Watch on GitHub Star on GitHub

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 🙂.

Pre-Minishop Instructions

In order to maximize our time during the minishop, please complete the following tasks in advance:

The more prepared you are for the minishop, the better it will go for you! 👍🏾

System Requirements

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.

Setup

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.

Running the app

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.

Minishop Outline

Let's learn about React! ⚛️

🧔🏾 About Me

Hiya! 👋🏾 My name is Ben Ilegbodu. 😄

🕘 Schedule

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.

❓ Asking Questions

  • Please interrupt me and ask questions! Others likely will have the same question.
  • However, unrelated questions are better sent to Twitter or my AMA.

🖥️ Zoom Hygiene

  • 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

⭐ Concepts

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)

🧠 Elaboration & Feedback

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.

🤝 Code of Conduct

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.

License

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.

👉🏾 First Step

Go to Step 0 - Begin.