Skip to content

Commit 0c12a7f

Browse files
committedMar 25, 2025·
docs: Update react DC docs
1 parent e50cdcb commit 0c12a7f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎docs/react/data-connect/mutations.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ Along with the data, the hook will also return the `ref`, `source`, and `fetchTi
8181
```tsx
8282
const createMovie = useDataConnectMutation(createMovieRef);
8383

84-
const data = await createMovie.mutateAsync({
84+
const { dataConnectResult } = await createMovie.mutateAsync({
8585
title: 'John Wick',
8686
genre: "Action",
8787
imageUrl: "https://example.com/image.jpg",
8888
});
8989

90-
console.log(data.ref);
91-
console.log(data.source);
92-
console.log(data.fetchTime);
90+
console.log(dataConnectResult.ref);
91+
console.log(dataConnectResult.source);
92+
console.log(dataConnectResult.fetchTime);
9393
```

‎docs/react/data-connect/querying.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ The hook will immediately have data available, and immediately refetch the data
7272
Along with the data, the hook will also return the `ref`, `source`, and `fetchTime` metadata from the query.
7373

7474
```tsx
75-
const { data } = useDataConnectQuery(listMoviesRef());
75+
const { dataConnectResult } = useDataConnectQuery(listMoviesRef());
7676

77-
console.log(data?.ref);
78-
console.log(data?.source);
79-
console.log(data?.fetchTime);
77+
console.log(dataConnectResult?.ref);
78+
console.log(dataConnectResult?.source);
79+
console.log(dataConnectResult?.fetchTime);
8080
```

‎packages/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"serve:coverage": "npx serve coverage",
1111
"emulator": "firebase emulators:start --project test-project",
1212
"emulator:kill": "lsof -t -i:4001 -i:8080 -i:9000 -i:9099 -i:9199 -i:8085 | xargs kill -9",
13-
"check": "pnpm biome check --write ./packages/react/src",
13+
"check": "tsc --noEmit",
1414
"publish-package": "pnpm run build && cd dist && npm publish"
1515
},
1616
"exports": {

0 commit comments

Comments
 (0)
Please sign in to comment.