DEV Community

Discussion on: Fresh: The Next-Gen JavaScript Web Framework

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Passing props to islands is supported, but only if the props are JSON serializable. This means that you can only pass primitive types, plain objects, and arrays. It is currently not possible to pass complex objects like Date, custom classes, or functions. This means that it is not possible to pass children to an island, as children are VNodes, which are not serializable.

It is also not supported to nest islands within other islands.

This part of the documentation is what I was referring to.

Thread Thread
 
pyrsmk profile image
Aurélien Delogu • Edited

Indeed, I forgot that part. This is quite limited then.

edit: just changed my mind, ahah