Skip to content

Latest commit

Β 

History

History
210 lines (169 loc) Β· 5.29 KB

File metadata and controls

210 lines (169 loc) Β· 5.29 KB
layout home
title React Hooks by AKG
hero
name text tagline image actions
React Hooks
by AKG
Master every React Hook β€’ From basics to advanced patterns β€’ Interactive examples β€’ Interview-ready notes
src alt
/logo.svg
React Hooks by AKG
theme text link
brand
Start Learning β†’
/hooks/
theme text link
alt
View Examples
theme text link
alt
Quick Reference
/hooks/01_useState
features
icon title details
⚑
Lightning Fast Learning
Concise explanations with clear mental models. Each hook broken down into digestible concepts with real-world examples.
icon title details
🧩
Interactive Examples
Runnable .tsx components for every hook. Import them into your Vite app and experiment hands-on.
icon title details
🧠
Interview Ready
Common questions, gotchas, and best practices. Quick revision notes to ace your React interviews.
icon title details
πŸ†•
React 19 Features
Latest form hooks (useActionState, useFormStatus, useOptimistic) and concurrent features explained.
icon title details
🎯
Practical Patterns
Custom hooks, performance optimization, and real-world patterns you'll actually use in production.
icon title details
πŸ“±
Modern & Responsive
Beautiful documentation that works perfectly on all devices. Dark mode included.

πŸš€ Quick Start

🌟 New to React Hooks?

Start with useState and useEffect to build a solid foundation

Begin with useState β†’

πŸ’ͺ Ready for Advanced?

Dive into performance optimization and custom hooks

Explore Performance β†’

πŸ”₯ React 19 Features

Learn the newest form and concurrent features

Discover React 19 β†’

πŸ“š Learning Path

🎯 Phase 1: Foundation (Essential)

Master these core hooks first - they're used in 90% of React applications.

  • useState - Local component state
  • useEffect - Side effects and lifecycle
  • useRef - DOM references and mutable values

⚑ Phase 2: Intermediate (Performance)

Level up with optimization and context management.

πŸš€ Phase 3: Advanced (Expert Level)

Master complex patterns and cutting-edge features.

🎨 Code Examples

Each hook comes with multiple examples you can run locally:

# Clone and run the examples
git clone https://github.com/ayush-gupta07/react-hooks
cd react-hooks
npm install
npm run dev
// Example: Counter with useState
import { useState } from 'react';

function Counter() {
  const [count, setCount] = useState(0);
  
  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={() => setCount(c => c + 1)}>
        Increment
      </button>
    </div>
  );
}

πŸ”— Quick Reference

State Management

useState, useReducer, useContext

Learn More β†’

Side Effects

useEffect, useLayoutEffect

Learn More β†’

Performance

useMemo, useCallback, useTransition

Learn More β†’

React 19

useActionState, useFormStatus, useOptimistic

Learn More β†’

πŸ’‘ **Tip**: This documentation is designed for active learning. Read the notes, then run the examples in your development environment for the best learning experience.
<style> .home-content { max-width: 1000px; margin: 0 auto; padding: 2rem; } .learning-path { background: var(--vp-c-bg-soft); border-radius: 16px; padding: 2rem; margin: 2rem 0; border: 1px solid var(--card-border); } .learning-path h3 { margin-top: 2rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--vp-c-brand-1); } .learning-path h3:first-of-type { margin-top: 0; } .footer-note { text-align: center; background: var(--brand-gradient-soft); border: 1px solid var(--vp-c-brand-1); border-radius: 12px; padding: 1.5rem; margin: 3rem 0; font-size: 1.1rem; } @media (max-width: 768px) { .home-content { padding: 1rem; } .learning-path { padding: 1.5rem; } } </style>