✅ Optimized Demos
Notice the improved performance with memoization, debouncing, and React 18 features
1. Memoized Calculations (useMemo)
✅ With useMemo
Expensive calculation runs only once and is cached
Expensive Value: 499,999,500,000
Count: 0
2. Debounced Search (useCallback)
✅ With Debounce (500ms)
Search count: 0 (only fires after you stop typing!)
Searching for: "..."
3. Split Context Providers
✅ Split Contexts + Memo
Each component only re-renders when its specific context changes
4. Concurrent Features (useTransition)
✅ With useDeferredValue
Type quickly — input updates instantly, expensive list update is deferred
Found 20,000 items
5. Stable Keys + React.memo
✅ Proper Keys (Stable IDs)
Using key={item.id} preserves state and prevents remounts
👆 Type in any input, then add an item. Input values stay with their items!
- ✅ Input values stay with their items
- ✅ Components don't remount on reorder
- ✅ State is preserved correctly
6. Optimized Images (next/image)
✅ Optimized Images (next/image)
Using Next.js <Image> — blur placeholder, lazy loading, responsive
- ✅ Automatic WebP/AVIF
- ✅ Blur placeholder (no CLS)
- ✅ Responsive sizing
- ✅ Lazy loading (first 2 priority)
7. Web Workers (Off Main Thread)
✅ With Web Worker (Background Thread)
Click "Calculate" and keep clicking the counter — UI stays responsive!
8. Virtualized Lists (10k+ items)
✅ With Virtualization
Only rendering visible items — smooth scrolling with 10,000 items!
9. React Profiler (Measurement)
✅ With React.memo (Profiler shows optimization)
Component only re-renders when its props actually change!
↑ This won't re-render the list — memo prevents it!