riverpod-mutations

Manage UI-driven async operations in Riverpod with Mutation API states.

8|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/serverpod/skills-registry --skill riverpod-mutations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: riverpod-mutations
Source: https://github.com/serverpod/skills-registry/tree/main/skills/riverpod/riverpod-mutations
Command: npx skills add https://github.com/serverpod/skills-registry --skill riverpod-mutations

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the management of asynchronous operations initiated by the user interface, such as form submissions, by providing a clear state for loading, success, and error, without cluttering the main provider state.

Core Features & Use Cases

  • State Management for Async Actions: Handles MutationIdle, MutationPending, MutationSuccess, and MutationError states.
  • UI Feedback: Enables easy display of loading indicators, error messages, and success confirmations tied to specific user actions.
  • Keyed Mutations: Supports multiple instances of the same mutation, useful for actions on individual list items.
  • Use Case: When a user submits a form, this skill can display a loading spinner and then show a success message or an error alert based on the operation's outcome.

Quick Start

Use the riverpod-mutations skill to run a mutation to add a new todo item.

Frequently Asked Questions about riverpod-mutations

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

FAQPage Schema
How do I manage async form submission states in Riverpod without cluttering my main provider?

Manage async form submission states in Riverpod using the experimental Mutation API to track loading, success, and error conditions independently of your main application state. It isolates UI-driven action states like MutationPending and MutationError.

What is the best way to show UI feedback for loading and errors during data updates in Riverpod?

Show UI feedback for data updates by handling MutationPending, MutationSuccess, and MutationError states. This approach allows you to directly display loading spinners, success confirmations, or error alerts tied to specific user actions.

How do I handle multiple async mutations on individual items in a list using Riverpod?

Handle multiple async mutations on list items using keyed mutations in Riverpod. This feature supports distinct instances of the same operation, allowing you to manage concurrent data updates for individual entities separately.

Can I track idle, pending, and success states for UI-driven operations separately in Riverpod?

Yes, you can track UI-driven operations separately using MutationIdle, MutationPending, MutationSuccess, and MutationError states. These specific states prevent async operation status from cluttering your primary data providers.

Does Riverpod support isolated state tracking for concurrent user actions like adding todo items?

Riverpod supports isolated state tracking for concurrent user actions through the experimental Mutation API. You can run mutations for tasks like adding todo items while maintaining distinct success or error states for each action.

When should I use keyed mutations for state management in Riverpod?

Use keyed mutations for state management in Riverpod when handling distinct operations across multiple entities, such as updating individual list items. This ensures separate tracking for concurrent actions without overlapping UI feedback.