next-safe-actionplayground
Overview
  • Home
Core
  • Core Actions
  • Validation Errors
  • Middleware
Hooks
  • React Hooks
  • Optimistic Updates
  • Coordinating Mutations
  • Pending Changes
Integrations
  • Form Integration
  • React Hook Form
  • TanStack Query
Framework
  • Navigation & Framework
  • Offline Support
  • GitHub

Pending Changes

useOptimisticStateAction holding only the in-flight changes, folded over server data by two sibling components.

Shared Pending List
The action returns nothing, so confirmed state stays in the Server Component. The provider holds the queue of pending changes and every consumer replays it over its own data.

Loading tasks...

Each save takes 1.2s. Move several tasks quickly: the board and the counters below it update together immediately, the writes are serialized rather than raced, and the pending list drains as the queue settles.

todo

  • Write the RFC
  • Ship the release

doing

  • Review the PR

done

  • Close the incident
todo: 2doing: 1done: 1Idle