Skip to content

Commit

Permalink
Add note about importing @preact/signals
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonmade committed Dec 5, 2024
1 parent 84c9abb commit 7166dda
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/preact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ The `RemoteRootRenderer` component is used to render a tree of remote elements t
The following component shows an example of how you could render a tree of remote elements using Preact. You’ll need to hand the `receiver` object’s `connection` property to the remote environment; some examples of how to do this are shown in the [runnable Remote DOM examples](/examples/).

```tsx
// If you don’t already have this import somewhere in your project, you need
// to add it — this import adds the Preact hooks that auto-subscribe components
// to signals.
import '@preact/signals';

import {render} from 'preact';
import {
createRemoteComponentRenderer,
Expand Down

0 comments on commit 7166dda

Please sign in to comment.