Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React.js - Complete Learning Journey

A comprehensive repository documenting my complete React.js learning journey from scratch to advanced concepts. This repo contains practical implementations, examples, and projects covering all core React concepts, hooks, patterns, and best practices.

πŸ“š What's Inside

This repository is organized as a step-by-step learning path covering everything from basic React fundamentals to advanced optimization techniques and real-world patterns.

🎯 Topics Covered

Fundamentals

  • JSX - JavaScript XML syntax for writing UI components
  • Components - Building blocks of React applications (Functional & Class components)
  • Props - Passing data between components
  • State - Managing component data that changes over time
  • Events - Handling user interactions (onClick, onChange, etc.)
  • Conditional Rendering - Showing/hiding elements based on conditions
  • Lists & Keys - Rendering arrays of data efficiently

React Hooks

  • useState - Managing state in functional components
  • useEffect - Side effects like API calls, subscriptions, timers
  • useContext - Accessing global state without prop drilling
  • useRef - Accessing DOM elements and persisting values
  • useReducer - Complex state management with reducer pattern
  • useMemo - Memoizing expensive calculations for performance
  • useCallback - Memoizing functions to prevent unnecessary re-renders
  • Custom Hooks - Creating reusable logic across components

Advanced Concepts

  • Context API - Global state management without Redux
  • React Router - Navigation and routing in single-page applications
  • Forms - Controlled components and form validation
  • Lifting State Up - Sharing state between sibling components
  • Composition vs Inheritance - React's component design patterns
  • Higher-Order Components (HOC) - Component logic reusability
  • Render Props - Sharing code between components using props

Performance Optimization

  • Lazy Loading - Code splitting and loading components on demand
  • React.memo - Preventing unnecessary component re-renders
  • useMemo & useCallback - Optimizing expensive operations
  • Virtualization - Efficiently rendering large lists
  • Code Splitting - Breaking app into smaller chunks for faster load

Styling in React

  • CSS Modules - Scoped CSS styling
  • Styled Components - CSS-in-JS library
  • Tailwind CSS - Utility-first CSS framework integration
  • Inline Styles - JavaScript object-based styling

API Integration

  • Fetch API - Making HTTP requests to REST APIs
  • Axios - Promise-based HTTP client
  • Error Handling - Try-catch blocks and error boundaries
  • Loading States - Showing spinners/loaders during data fetch
  • Data Fetching Patterns - useEffect with async/await

React Internals

  • Virtual DOM - How React efficiently updates the UI
  • Reconciliation - React's diffing algorithm for minimal DOM updates
  • Fiber Architecture - React's internal rendering engine
  • Component Lifecycle - Mounting, updating, and unmounting phases

Best Practices

  • Component Structure - Organizing files and folders
  • State Management - When to use local vs global state
  • Error Boundaries - Catching JavaScript errors in components
  • PropTypes - Type checking for props
  • React DevTools - Debugging React applications

πŸ“ Repository Structure

React/
β”œβ”€β”€ 1demoshopapp/              # E-commerce demo app
β”œβ”€β”€ 2class/                    # Class components basics
β”œβ”€β”€ 3das/                      # React fundamentals
β”œβ”€β”€ 4spp/                      # Single page application
β”œβ”€β”€ 4useeffect/                # useEffect hook practice
β”œβ”€β”€ 5class/                    # Advanced class components
β”œβ”€β”€ 6form/                     # Form handling
β”œβ”€β”€ 6reactform/                # React forms with validation
β”œβ”€β”€ 7router/                   # React Router implementation
β”œβ”€β”€ 8routerproject/            # Router project example
β”œβ”€β”€ 9advance_costume_hooks/    # Custom hooks creation
β”œβ”€β”€ 10_context_api/            # Context API examples
β”œβ”€β”€ 11_contex_next/            # Advanced Context patterns
β”œβ”€β”€ 12shopappredux/            # Redux state management
β”œβ”€β”€ 13shopappredux/            # Redux with middleware
β”œβ”€β”€ 14otplogin/                # OTP login implementation
β”œβ”€β”€ Chichya/                   # Practice projects
β”œβ”€β”€ Harry_Project_Password/    # Password generator project
β”œβ”€β”€ create-react-tailwind-css-starter/ # Tailwind setup
β”œβ”€β”€ react_vite_starter/        # Vite React starter
β”œβ”€β”€ userefhookloveyoutube/     # useRef hook examples
└── README.md

πŸš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Basic JavaScript knowledge

Running Any Project

# Clone the repository
git clone https://github.com/nikhild1111/React.git
cd React

# Navigate to any project folder
cd 1demoshopapp

# Install dependencies
npm install

# Start development server
npm start

πŸ“– Learning Path

Week 1-2: Fundamentals

  1. JSX and Components
  2. Props and State
  3. Event Handling
  4. Conditional Rendering

Week 3-4: Hooks

  1. useState and useEffect
  2. useContext and useRef
  3. useReducer for complex state
  4. Custom Hooks

Week 5-6: Advanced Topics

  1. React Router
  2. Context API
  3. Performance optimization
  4. Error handling

Week 7-8: Projects

  1. Build real-world applications
  2. Implement best practices
  3. Optimize performance

πŸ› οΈ Technologies Used

  • React.js
  • React Router
  • Context API
  • Redux (optional)
  • Axios for API calls
  • Tailwind CSS
  • Vite (build tool)

πŸ’‘ Key Learnings

Why useState?

Manages component state. When state changes, component re-renders automatically.

Why useEffect?

Handles side effects like API calls, timers, subscriptions. Runs after render.

Why useContext?

Avoids prop drilling. Share data globally without passing props through every level.

Why useRef?

Access DOM elements directly. Persist values without causing re-renders.

Why useMemo?

Caches expensive calculations. Only recalculates when dependencies change.

Why useCallback?

Memoizes functions. Prevents child components from re-rendering unnecessarily.

Why Lazy Loading?

Splits code into chunks. Loads components only when needed, improving initial load time.

Why Virtual DOM?

React creates virtual copy of DOM. Compares changes and updates only what's necessary, making updates faster.

Why Reconciliation?

React's diffing algorithm. Determines minimal changes needed to update UI efficiently.

🎯 Projects Included

  • Shopping App - E-commerce with cart functionality
  • Form Handling - Multiple form validation examples
  • Router Project - Multi-page navigation
  • OTP Login - Authentication with OTP
  • Password Generator - Random password creator
  • Custom Hooks Examples - Reusable logic patterns

🀝 Contributing

This is a personal learning repository, but suggestions and improvements are welcome!

πŸ“§ Contact

For any questions or discussions about React concepts, feel free to reach out via GitHub.


Happy Learning React! πŸš€

About

This repository documents my React.js learning journey from basics to advanced concepts through hands-on practice. It includes practical examples, mini-projects, and core React features such as hooks, routing, context, and performance optimization. Built using React, Vite, Tailwind CSS, and modern JavaScript.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages