Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 481 Bytes

itchy-tigers-help.md

File metadata and controls

22 lines (17 loc) · 481 Bytes
@astrojs/preact astro
minor
patch

Shared state in Preact components with signals

This makes it possible to share client state between Preact islands via signals.

For example, you can create a signals in an Astro component and then pass it to multiple islands:

---
// Component Imports
import Counter from '../components/Counter';
import { signal } from '@preact/signals';
const count = signal(0);
---

<Count count={count} />
<Count count={count} />