Skip to content

RFC: Composed Async - #822

Open
ubugeeei wants to merge 3 commits into
vuejs:masterfrom
ubugeeei-forks:composed-async
Open

ubugeeei wants to merge 3 commits into
vuejs:masterfrom
ubugeeei-forks:composed-async

Conversation

@ubugeeei

@ubugeeei ubugeeei commented Mar 5, 2026

Copy link
Copy Markdown
Member

Summary

Unify Vue's asynchronous reads and optimistic writes around the reactive graph while preserving the broader Composed Async motivation.

  • explain why the current <Suspense> model remains incomplete: dependencies are component-shaped, async setup is implicit and coarse, revalidation follows tree shape, pending causes are opaque, and mutations use a separate consistency model
  • allow readonly computed() getters to return Promises and expose ComputedRef<Awaited<T>>
  • propagate pending and rejected states through derived computed values
  • let existing <Suspense> handle initial fallback and hold committed content during revalidation
  • add optimistic(target, { update, run, commit }) with reconciliation, rollback, and deterministic rebasing for overlapping mutations
  • avoid the previously proposed <script async setup>, v-defer, and <Suspense :with> APIs

The proposal remains transport- and cache-agnostic. It does not define server actions, form submission, automatic cancellation, or a source-level pending API.

Links

Validation

  • pnpm dlx prettier@3.6.2 --single-quote false --check active-rfcs/0045-composed-async.md
  • git diff --check
  • verified all linked reference pages return HTTP 200

Important: Do NOT comment on this PR. Please use a corresponding RFC discussion thread for feedback, as it provides branched discussions that are easier to follow.

@ubugeeei
ubugeeei marked this pull request as ready for review March 5, 2026 11:18
@ubugeeei ubugeeei changed the title feat: composed async RFC:: Composed Async Mar 7, 2026
@ubugeeei ubugeeei changed the title RFC:: Composed Async RFC: Composed Async Mar 7, 2026
@ubugeeei ubugeeei changed the title RFC: Composed Async feat: add async reactivity to computed Aug 14, 2026
@ubugeeei ubugeeei changed the title feat: add async reactivity to computed RFC: Composed Async Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant