Skip to content

Commit 235d3b1

Browse files
authored
use => useResource
1 parent 7581a6f commit 235d3b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/frameworks/react/-snippets/resources.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const Stopwatch = Resource(({ on }) => {
2828
// #endregion
2929

3030
// #region component
31-
import { use } from "@starbeam/react";
31+
import { useResource } from "@starbeam/react";
3232

3333
export const Clock = () => {
3434
// #highlight:next
35-
const time = use(() => Stopwatch, []);
35+
const time = useResource(() => Stopwatch, []);
3636

3737
return <div>{time ?? "now"}</div>;
3838
};

0 commit comments

Comments
 (0)