Skip to content

Commit 969d4b1

Browse files
committed
Fix react docs syntax
1 parent 2e31f1e commit 969d4b1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

react.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ import { usePolybase, useDocument } from "@polybase/react";
4141
export const Component = () => {
4242
const polybase = usePolybase();
4343
const { data, error, loading } =
44-
useDocument <
45-
OptionalCustomType >
46-
polybase.collection("users").record("id");
44+
useDocument<OptionalCustomType>(polybase.collection("users").record("id"));
4745

4846
return data.data.name;
4947
};
@@ -58,7 +56,7 @@ import { usePolybase, useCollection } from "@polybase/react";
5856
export const Component = () => {
5957
const polybase = usePolybase();
6058
const { data, error, loading } =
61-
useCollection < OptionalCustomType > polybase.collection("users");
59+
useCollection<OptionalCustomType>(polybase.collection("users"));
6260

6361
const usersEl = map(data, ({ data }) => {
6462
return <div key={data.id}>{data.name}</div>;

0 commit comments

Comments
 (0)