reactor-async

Manage asynchronous data flows with Reactor hooks for fetching, mutation, and pagination.

609|44|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/microsoft/microsoft-ui-reactor --skill reactor-async
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reactor-async
Source: https://github.com/microsoft/microsoft-ui-reactor/tree/main/plugins/reactor/skills/reactor-async
Command: npx skills add https://github.com/microsoft/microsoft-ui-reactor --skill reactor-async

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Async data in Reactor is managed with dedicated hooks for single fetch, writes with optimistic updates, cursor-based pagination, and a bubble-up fallback, eliminating manual cancellation and scattered state management.

Core Features & Use Cases

  • UseResource: fetch a single resource and expose AsyncValue<T> with Loading, Data, Error, and Reloading states.
  • UseMutation: perform server mutations with optimistic updates and a stable Mutation handle.
  • UseInfiniteResource: cursor-based pagination with page loading, caching, retry, and refresh capabilities.
  • Pending: bubble-up fallback that aggregates loading across nested resources.

Quick Start

Create a Reactor component that uses UseResource to fetch data and UseMutation to update it.

Frequently Asked Questions about reactor-async

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage asynchronous data fetching in WinUI without scattered state management?

Manage asynchronous data in WinUI using dedicated hooks like UseResource to fetch single resources and expose AsyncValue<T> states, eliminating manual cancellation and scattered state management.

What is the best way to handle server mutations with optimistic updates in Reactor?

Handle server mutations in Reactor using the UseMutation hook, which provides a stable Mutation handle to perform writes with optimistic updates and manage server state efficiently.

How does cursor-based pagination work for large collections in Reactor?

Cursor-based pagination in Reactor uses the UseInfiniteResource hook to load pages sequentially, providing built-in caching, retry logic, and refresh capabilities for large collections.

Can I configure caching and retry behavior for async data in Reactor?

Configure caching and retry behavior in Reactor using optional ResourceOptions, allowing you to set StaleTime, CacheTime, RetryCount, and RefetchOnMount for async data fetching.

How do I aggregate loading states across nested async resources in Reactor?

Aggregate loading states across nested async resources in Reactor using the Pending bubble-up fallback, which automatically consolidates loading indicators for nested components.

Do I need CancellationToken-aware fetchers for async data flows in Reactor?

Reactor enforces CancellationToken-aware fetchers for async data flows, ensuring that resource fetching, memoized dependencies, and data cancellation are handled safely.