Small Router Without Library

Hard
6 views 25 Jan 2026
Create a tiny router that switches pages using state and buttons....

Prevent Unnecessary Re-render

Hard
5 views 25 Jan 2026
Move inline objects outside render to avoid new references each render....

Inline Style Objects Move Outside

Medium
5 views 25 Jan 2026
Refactor a component to move style objects outside and keep render clean....

useMemo For Filtered List

Hard
8 views 25 Jan 2026
Use useMemo to avoid filtering a list on every render unnecessarily....

useCallback Stable Handler

Hard
6 views 25 Jan 2026
Use useCallback to keep a stable function reference for a memoized child....

Memoized Row Component

Hard
6 views 25 Jan 2026
Create a table where each row is memoized to avoid extra re-renders....

Lazy Loaded Section

Hard
5 views 25 Jan 2026
Use React.lazy and Suspense to load a heavy section....

Stable Keys Not Index

Easy
7 views 25 Jan 2026
Render a list with stable ids and avoid using index as key....

Split State By Concern

Medium
5 views 25 Jan 2026
Split a component state into two smaller states to avoid confusion....

Keep Mutable Value In Ref

Hard
6 views 25 Jan 2026
Use useRef to store a mutable value without re-rendering....

Memoize Derived Stats

Hard
6 views 25 Jan 2026
Compute derived stats from a list and memoize the result....

useDeferredValue Search

Hard
6 views 25 Jan 2026
Use useDeferredValue to keep typing smooth during heavy filtering....

useTransition Filter

Hard
8 views 25 Jan 2026
Use useTransition to show pending state while updating an expensive list....

Windowed List Virtualization

Hard
6 views 25 Jan 2026
Render 10k+ items smoothly by only rendering visible rows (manual virtualization)....

Debounced Search With Hook

Medium
7 views 25 Jan 2026
Debounce user typing so filtering runs less often and feels smoother....

Throttled Scroll Progress

Hard
8 views 25 Jan 2026
Update scroll progress smoothly without setting state on every scroll event....

Memoize Context Value

Hard
7 views 25 Jan 2026
Avoid re-rendering consumers by memoizing the context value object....

useSyncExternalStore Mini Store

Hard
6 views 25 Jan 2026
Subscribe to an external store without tearing using useSyncExternalStore....

React.memo With Custom Compare

Hard
6 views 25 Jan 2026
Memoize rows so only the selected row re-renders when selection changes....

Stable Object Props With useMemo

Medium
5 views 25 Jan 2026
Pass stable object props to memoized child so it doesn’t re-render....

Memoize Expensive Computation

Medium
5 views 25 Jan 2026
Calculate heavy derived data once per input change using useMemo....

Functional Updates For Batching

Easy
5 views 25 Jan 2026
Update state multiple times safely using functional setState....

Intl Formatter Outside Component

Easy
7 views 25 Jan 2026
Create expensive Intl formatter once, not every render....

Defer Heavy Work With Idle Callback

Hard
6 views 25 Jan 2026
Run heavy work when the browser is idle so UI stays responsive....

Preload Lazy Panel On Hover

Hard
5 views 25 Jan 2026
Preload a lazy component when user hovers so it opens instantly....

Render Count Tracker

Medium
6 views 25 Jan 2026
Track how many times a component re-rendered and show it on screen....

Memoized Lookup Map

Medium
6 views 25 Jan 2026
Build a lookup Map once and use it for fast access during rendering....

Controlled Input In Memo Child

Hard
6 views 25 Jan 2026
Keep a fast input responsive by isolating re-renders in a memo child....

Sorting With useMemo

Medium
7 views 25 Jan 2026
Sort a list only when sort options change, not on every render....

Forward Ref Input Focus

Hard
7 views 25 Jan 2026
Build an input component that exposes focus() using forwardRef....

Memoized Presentational Component

Hard
5 views 25 Jan 2026
Create a presentational component and wrap it with React.memo....

Error Boundary Component

Hard
5 views 25 Jan 2026
Create an ErrorBoundary that catches render errors and shows a fallback UI....