Skip to content

A hands-on React learning repo with topic-wise examples, practical projects, and detailed comments for beginners and intermediate learners.

Notifications You must be signed in to change notification settings

nyxsky404/React

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ πŸ‘€ Unlock the Secrets of Reactβ€”Start Your Journey Here!

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.


⚑ How to Create a New Vite + React Project

1. Open your terminal and run:

```sh
npm create vite@latest
```

2. Enter your project name (e.g., react-project).

3. Select "React" and then choose "JavaScript" or "TypeScript" as per your preference.

4. Navigate to your project folder:

```sh
cd react-project
```

5. Install dependencies:

```sh
npm install
```

6. Start the development server:

```sh
npm run dev
```

7. Open http://localhost:5173 in your browser to see your app.


πŸ“₯ Getting Started (for this repo)

1. Clone the Repository

git clone https://github.com/nyxsky404/React.git
cd React/react-project

2. Install Dependencies

npm install

3. Start the Development Server

npm run dev

Open http://localhost:5173 in your browser to see the app.


πŸ§‘β€πŸ’» Recommended VS Code Extension

πŸ’‘ 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.


πŸ—‚οΈ Project Structure

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!

πŸ“š Learning Flow

Follow this order for a smooth React journey:

1. Intro

  • Intro/Component.jsx
  • Intro/Food.jsx
  • Intro/Footer.jsx
  • Intro/Header.jsx
    Basic Intro to React.

2. Styling in React

  • StyleJs/Card.jsx
  • StyleJs/Button.jsx
    Learn external, module, and inline styling.

3. Props

  • Props/Student.jsx
    Learn how to pass data from parent to child components.

4. Conditional Rendering

  • ConditionalRender/UserGreeting.jsx
  • ConditionalRender/IfElse.jsx
    Show/hide UI based on conditions.

5. Rendering Lists

  • ListRender/Lists.jsx
  • ListRender/Lists2.jsx
    Render arrays and objects dynamically.

6. Click Events

  • Click-event/Click.jsx
  • Click-event/Event.jsx
  • Click-event/Image.jsx
    Handle user interactions with buttons and images.

7. useState Hook

  • UseState/UseState.jsx
  • UseState/Project1.jsx
  • UseState/UpdaterFunction.jsx
  • UseState/UpdateObject.jsx
    Manage state in functional components.

8. onChange Event Handler

  • Change-event/Change.jsx
    Handle form inputs and real-time updates.

9. Mini Projects

  • Change-event/Project2.jsx
    Build a color picker using state and events.

10. useEffect Hook

  • UseEffect/UseEffect.jsx
    Perform side effects (e.g., updating the document title).

11. (Coming Soon) useContext & useRef Hooks

  • Extend your learning with advanced hooks!

πŸ“ How to Explore

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


πŸŽ₯ Video Reference

This repo follows the flow and examples from Bro Code's React Tutorial.
Feel free to watch alongside for extra explanations!


πŸ’‘ Tips

  • Use VS Code for the best experience.
  • Install the Better Comments extension.
  • Experiment with the codeβ€”React is best learned by doing!

🀝 Contributing

Found a typo or want to add more examples?
Feel free to open a pull request or issue!


⭐️ Happy Learning!

"The best way to learn React is to build, break, and rebuild."
β€” Bro Code


About

A hands-on React learning repo with topic-wise examples, practical projects, and detailed comments for beginners and intermediate learners.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published