rdc-react

Expose React hooks for data fetching, caching, and live updates.

2.0k|99|Updated Feb 15, 2019
One-click install
npx skills add https://github.com/reactive/data-client --skill rdc-react
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rdc-react
Source: https://github.com/reactive/data-client/tree/main/.cursor/skills/rdc-react
Command: npx skills add https://github.com/reactive/data-client --skill rdc-react

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a cohesive set of React hooks (useSuspense, useQuery, useCache, useLive, useDLE, useSubscription, useController) to streamline data fetching, caching, and real-time updates, reducing boilerplate and improving consistency across UI layers.

Core Features & Use Cases

  • Hook suite: useSuspense, useQuery, useCache, useLive, useDLE, useSubscription, useController for read/write operations, plus DataProvider and AsyncBoundary to structure data flow.
  • Programmatic queries and real-time updates: integrate REST, GraphQL, and streaming sources with centralized state and automatic normalization.
  • Use Case: building a Todo app that fetches lists/items, subscribes to live changes, and handles optimistic mutations with a shared controller.

Quick Start

Wrap your app with DataProvider and begin fetching data with useSuspense to render TodoResource results.

Frequently Asked Questions about rdc-react

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

FAQPage Schema
How do I manage data fetching and caching in React without writing boilerplate?

You can manage data fetching and caching in React by using ergonomic hooks like useSuspense and useQuery to streamline operations, reducing boilerplate and ensuring consistency across UI layers.

What is the best way to handle live updates and real-time data in a React application?

The best way to handle live updates in React is by using dedicated hooks like useLive and useSubscription to integrate streaming sources with centralized state and automatic normalization.

Can I use React suspense for data dependencies across REST and GraphQL?

Yes, you can use React suspense for data dependencies across REST, GraphQL, and streaming sources by leveraging the useSuspense hook within a DataProvider structure.

How do I set up a React app to fetch data and handle optimistic mutations?

Wrap your app with DataProvider to structure data flow, then use the useController hook alongside useSuspense to fetch data and handle optimistic mutations with a shared controller.

Does this React data hook suite work with both read and write operations?

Yes, the React data hook suite supports read and write operations by providing a cohesive set of hooks including useQuery, useCache, and useController for comprehensive data management.