Lesson 4.3
Optimistic updates
Optimistic UI shows the expected result immediately and reconciles when the server answers. The interesting part is what happens when the server disagrees.
8mIntermediate7,874 students

Sign in to watch this lesson
Browsing is free. Create an account to play videos and track your progress.
Overview
Optimistic UI shows the expected result immediately and reconciles when the server answers. The interesting part is what happens when the server disagrees.
What this lesson covers
- Render the expected state before the server confirms
- Roll back cleanly when the action fails
- Keep optimistic state scoped to the component that owns it
This lesson sits in Server Actions and Mutations, part of Next.js App Router in Depth. It assumes what came before it and leads directly into the next lesson in the module.
In this lesson you will:
- Render the expected state before the server confirms
- Roll back cleanly when the action fails
- Keep optimistic state scoped to the component that owns it