Welcome to the React Learning Playground!
This repository is a hands-on, topic-wise guide to mastering React fundamentals, inspired by Bro Code's YouTube tutorial.
Whether you're a beginner or brushing up your skills, this repo is packed with practical examples, detailed comments, and a recommended learning flow.
```sh
npm create vite@latest
```
```sh
cd react-project
```
```sh
npm install
```
```sh
npm run dev
```
7. Open http://localhost:5173 in your browser to see your app.
git clone https://github.com/nyxsky404/React.git
cd React/react-project
npm install
npm run dev
Open http://localhost:5173 in your browser to see the app.
π‘ For the best learning experience, install the Better Comments extension in VS Code!
This repo uses color-coded comments for alerts, info, TODOs, and more.
react-project/
β
βββ src/
β βββ App.jsx # Main app, imports all topic components
β βββ index.css # Global styles
β βββ main.jsx # Entry point
β βββ assets/ # Static assets (e.g., react.svg)
β βββ Intro/ # Basic components, header, footer, food, etc.
β βββ Props/ # Props usage and examples
β βββ ConditionalRender/ # Conditional rendering (if-else, ternary)
β βββ ListRender/ # Rendering lists and objects
β βββ Click-event/ # Click, double-click, and event handling
β βββ Change-event/ # onChange handler, color picker project
β βββ StyleJs/ # Styling in React (CSS, modules, inline)
β βββ UseState/ # useState hook, updater, object state
β βββ UseEffect/ # useEffect hook and examples
β βββ ... (future topics)
β
βββ public/ # Static files
βββ package.json # Project metadata & scripts
βββ vite.config.js # Vite config
βββ README.md # You're here!
Follow this order for a smooth React journey:
Intro/Component.jsx
Intro/Food.jsx
Intro/Footer.jsx
Intro/Header.jsx
Basic Intro to React.
StyleJs/Card.jsx
StyleJs/Button.jsx
Learn external, module, and inline styling.
Props/Student.jsx
Learn how to pass data from parent to child components.
ConditionalRender/UserGreeting.jsx
ConditionalRender/IfElse.jsx
Show/hide UI based on conditions.
ListRender/Lists.jsx
ListRender/Lists2.jsx
Render arrays and objects dynamically.
Click-event/Click.jsx
Click-event/Event.jsx
Click-event/Image.jsx
Handle user interactions with buttons and images.
UseState/UseState.jsx
UseState/Project1.jsx
UseState/UpdaterFunction.jsx
UseState/UpdateObject.jsx
Manage state in functional components.
Change-event/Change.jsx
Handle form inputs and real-time updates.
Change-event/Project2.jsx
Build a color picker using state and events.
UseEffect/UseEffect.jsx
Perform side effects (e.g., updating the document title).
- Extend your learning with advanced hooks!
-
Read the comments!
Each file is heavily commented for clarity.
Look for// *
,// !
,// TODO
, and other tags (highlighted by Better Comments). -
Try modifying code
Change props, state, or handlers and see what happens. -
Check the
App.jsx
See how all components are imported and rendered.
This repo follows the flow and examples from Bro Code's React Tutorial.
Feel free to watch alongside for extra explanations!
- Use VS Code for the best experience.
- Install the Better Comments extension.
- Experiment with the codeβReact is best learned by doing!
Found a typo or want to add more examples?
Feel free to open a pull request or issue!
"The best way to learn React is to build, break, and rebuild."
β Bro Code