Frontend Track • Advanced • 5 mins review
Fix: Tighten NotificationCenter optimistic updates
Refactors NotificationCenter to feel snappier by applying optimistic UI updates before the API request settles.
Scenario Goal & Context
Goal: Apply the new item locally first, persist it in the background, and roll back if the request fails.
Background: Users were waiting for a server round-trip before new entries appeared in NotificationCenter, which made the interface feel laggy.
Changed Files (2)
- src/components/NotificationCenter.tsx +19 -3
- src/components/NotificationCenter.test.tsx +12 -0
Ready to practice reviewing this PR?
Open this scenario inside the interactive DiffSense simulator to leave inline comments and receive an automated score.
Start Review Session