Skip to content

Commit 879caa4

Browse files
authored
Merge pull request #15 from rschristian/fix/preact-docs
fix: References to React in Preact docs
2 parents 361c20a + e5d86d7 commit 879caa4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/frameworks/preact/$snippets/resources.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const Stopwatch = Resource(({ on }) => {
2828
// #endregion stopwatch
2929

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

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

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

src/frameworks/preact/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<Demo :config="resources" />
88

9-
Start by installing the React renderer into your app.
9+
Start by installing the Preact renderer into your app.
1010

1111
```npm
1212
@starbeam/preact @starbeam/universal @starbeam/js
@@ -20,12 +20,12 @@ This is the most basic way to use Starbeam in a Preact app.
2020

2121
## The `use` Hook
2222

23-
The `@starbeam/react` renderer also includes a `use` hook, which allows you to attach
24-
Starbeam resources into a React app. Resources are instantiated when the component is mounted, and
23+
The `@starbeam/preact` renderer also includes a `use` hook, which allows you to attach
24+
Starbeam resources into a Preact app. Resources are instantiated when the component is mounted, and
2525
cleaned up when the component is unmounted.
2626

2727
To get an idea for how it works, we'll integrate the Stopwatch resource from the [Guides](/guides/fundamentals/resources) section
28-
into React.
28+
into Preact.
2929

3030
As a quick refresher, here's what the resource looks like:
3131

0 commit comments

Comments
 (0)