Skip to content

Commit 70fddec

Browse files
authored
internal: Update data-client skills for v0.16 APIs (#3776)
Made-with: Cursor
1 parent a7a32e6 commit 70fddec

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.cursor/skills/data-client-react/SKILL.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: data-client-react
3-
description: Use @data-client/react hooks - useSuspense, useQuery, useCache, useLive, useDLE, useSubscription, useController for fetch/mutations, DataProvider, AsyncBoundary, useLoading, useDebounce
3+
description: Use @data-client/react hooks - useSuspense, useFetch, useQuery, useCache, useLive, useDLE, useSubscription, useController for fetch/mutations, DataProvider, AsyncBoundary, useLoading, useDebounce
44
license: Apache 2.0
55
---
66
## Rendering
@@ -19,6 +19,9 @@ const todo = useCache(TodoResource.get, { id: 5 });
1919
const todo = useQuery(Todo, { id: 5 });
2020
// fetch without Suspense - returns { data, loading, error }
2121
const { data, loading, error } = useDLE(TodoResource.get, { id: 5 });
22+
// suspense in parallel
23+
const post = use(useFetch(PostResource.get, { id }));
24+
const comments = use(useFetch(CommentResource.getList, { postId: id }));
2225
// subscribe without Suspense (use with useSuspense or useDLE)
2326
useSubscription(TodoResource.get, { id: 5 });
2427
```
@@ -125,6 +128,7 @@ This is useful for webosckets, SSE, logging, etc. Always use the skill "data-cli
125128
For detailed API documentation, see the [references](references/) directory:
126129

127130
- [useSuspense](references/useSuspense.md);[_pagination.mdx](references/_pagination.mdx) - Fetch with Suspense
131+
- [useFetch](references/useFetch.md) - Fetch for React.use() and parallel loading
128132
- [useQuery](references/useQuery.md) - Read from cache without fetch
129133
- [useCache](references/useCache.md) - Read from cache (nullable)
130134
- [useLive](references/useLive.md);[_useLive.mdx](references/_useLive.mdx) - Fetch + subscribe to updates
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../docs/core/api/useFetch.md

.cursor/skills/data-client-schema/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ to represent the data expected.
6969
To define polymorphic resources (e.g., events), use [Union](references/Union.md) and a discriminator field.
7070

7171
```typescript
72-
import { Union } from '@data-client/rest';
72+
import { Union } from '@data-client/rest'; // also available from @data-client/endpoint
7373

7474
export abstract class Event extends Entity {
7575
type: EventType = 'Issue'; // discriminator field is shared

0 commit comments

Comments
 (0)