useOptimistic: Instant UI Updates Before the Server Responds
useOptimistic lets you show an optimistic version of state immediately while the real async operation is still in flight. When it resolves, React reconciles. If it fails, React rolls back. No manual undo logic required.
June 7, 20261 min read2 / 3