mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
b1964e9e1b
This reverts commit 25a5b9a89a
.
22 lines
481 B
Markdown
22 lines
481 B
Markdown
---
|
|
'@astrojs/preact': minor
|
|
'astro': 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:
|
|
|
|
```astro
|
|
---
|
|
// Component Imports
|
|
import Counter from '../components/Counter';
|
|
import { signal } from '@preact/signals';
|
|
const count = signal(0);
|
|
---
|
|
|
|
<Count count={count} />
|
|
<Count count={count} />
|
|
```
|