feat: support passing signals as island props (#757)

This commit adds support for passing signals to islands in component
props. This is useful for passing around mutable state between islands.
The signal's value needs to be serializable for this to work.
This commit is contained in:
Luca Casonato
2023-05-31 10:29:46 +02:00
committed by GitHub
parent a6852fa58f
commit e3f9a0df08
11 changed files with 136 additions and 13 deletions
+1
View File
@@ -39,6 +39,7 @@ Fresh can serialize the following types of values:
`null`, and `bigint`s are not supported)
- Plain objects with string keys and serializable values
- Arrays containing serializable values
- Preact Signals (if the inner value is serializable)
Circular references are supported. If an object or signal is referenced multiple
times, it is only serialized once and the references are restored upon