feat: support passing URL to islands (#3181)
Adds support for passing `URL` values to Islands.
```tsx
// routes/index.html
export default function Page() {
return <MyIsland url={new URL("https://fresh.deno.dev")} />;
}
```
Also updates documentation with some missing serialization features
(`undefined`, `Map`, `Set`, and `-0`).
---------
Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
This commit is contained in:
co-authored by
Marvin Hagemeister
parent
03f6981860
commit
57596dc406
@@ -40,12 +40,15 @@ const app = new App()
|
||||
Passing props to islands is supported, but only if the props are serializable.
|
||||
Fresh can serialize the following types of values:
|
||||
|
||||
- Primitive types `string`, `number`, `boolean`, `bigint`, and `null`
|
||||
- `Infinity`, `-Infinity`, and `NaN`
|
||||
- Primitive types `string`, `number`, `boolean`, `bigint`, `undefined`, and
|
||||
`null`
|
||||
- `Infinity`, `-Infinity`, `-0`, and `NaN`
|
||||
- `Uint8Array`
|
||||
- `URL`
|
||||
- `Date`
|
||||
- `RegExp`
|
||||
- `JSX` Elements
|
||||
- Collections `Map` and `Set`
|
||||
- Plain objects with string keys and serializable values
|
||||
- Arrays containing serializable values
|
||||
- Preact Signals (if the inner value is serializable)
|
||||
|
||||
Reference in New Issue
Block a user