DEV Community

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

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Seems good for building some apps, but the lack of embedded interactive components inside other interactive components would mean that most projects I work on would not be right for it, at least yet. Very interesting though.

Collapse
 
pyrsmk profile image
Aurélien Delogu

Ah. You can't have a tree of interactive components? This is weird.

Collapse
 
harshhhdev profile image
Harsh Singh

There's a directory inside of Fresh for interactive components, I'm pretty sure you can have a tree of interactive components. Don't quote me on it though.

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

Collapse
 
harshhhdev profile image
Harsh Singh

That is true, and I think that'll be the main hinderance in the way of using this at scale. However I think it's still pushing innovation further regardless. The 'no build step' is something new and innovative I hadn't seen before, am interested to see how this pushes other frameworks such as Remix or Next.js.

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Agreed, there are several things here which are very interesting.