optimistic UI

Updating the screen immediately as if an action succeeded, before the server confirms it, and undoing the change if it fails.

In more detail

A like button that increments instantly feels faster than one that waits for the network. React's useOptimistic shows the optimistic value while the action runs and falls back to the real server state when it ends.

Related terms

Taught in

References