1 Component Basics
Functional Component & Props
children & Default Props
JSX Rules
Inline Styles & Dynamic Classes
Event Handling
2 Core Hooks
useState
useEffect — all 3 forms
useRef
useContext
3 Performance Hooks
useMemo
useCallback
React.memo
4 Form Patterns
Controlled Input & Form Submit
Select, Checkbox & Textarea
5 Lists & Conditionals
.map() with key
-
{products.map(product => (
- {product.name} — ${product.price} ))}
&& and Ternary Rendering
- {items.map(i =>
- {i.name} )}
Early Return
User not found
; // Main render — user is guaranteed here return ({user.name}
{user.email}
6 Context Pattern
Full Context Setup (AuthContext example)
Using Context in Components
7 useReducer Pattern
Reducer Function & Action Types
useReducer & dispatch
Items: {state.items.length}
{state.items.map(item => (
{item.name} x {item.qty}
))}
8 Custom Hooks
useFetch — data fetching hook
Error: {error}
; return{data.name}
; }useLocalStorage & custom hook rules
9 React Router Quick Ref
BrowserRouter / Routes / Route / Outlet
Link / useParams / useNavigate
Product {id}
; } // useNavigate — programmatic navigation function CheckoutButton() { const navigate = useNavigate(); function handleCheckout() { navigate('/checkout'); // go to route navigate(-1); // browser back navigate('/', { replace: true }); // replace history } return ; }Africa & India's Best AI Academy
You've got the React patterns.
Now build full-stack products with them.
Join the Best AI Programs — three 5-month courses, fully online, with placement assistance. Week 1 is free.
Explore our AI-era courses →