Module 39: Frontend Quality

Lesson 4 of 5 · 15–25 minutes

Performance

🏠The everyday picture

A slow shop is usually slow for a few reasons: a long queue at one counter, or stock kept in the far warehouse. Measure where the time goes before hiring more staff.

📘What it really is

🖱️Try it

Load 2,000 fake enquiries (generate them in db.json). Use the Profiler to measure typing in the search box. If it's slow, try useMemo for the filtered list, and measure again. Then lazy-load the detail page with lazy and check in the Network tab that its code downloads only when you open it.

✅Quick check

Should you wrap every component in memo?

Show the answer

No. Measure first and optimise only where there's a real, measured problem.

What does lazy loading a route do?

Show the answer

Its code is downloaded only when someone visits that page, making the first load smaller.

← PreviousAccessibility in React apps
ProLearners Assist