DEV Community

Discussion on: 2021 JavaScript framework

 
132 profile image
Yisar

It seems that sinuous escapes compilation by translating JSX into htm, and this technique is also applicable to fre.

Solidjs does change some semantics. For example, it does not rely on function execution to generate a new view, which violates the immediate mode, which is inconsistent with semantics.

However, so far, I have not found a compilation route that fully conforms to semantics.

Thread Thread
 
lexlohr profile image
Alex Lohr

It seems that sinuous escapes compilation by translating JSX into htm

How does "translating" differs from "compilation"? Also, from what I can see, sinuous is using the exact same templating mechanisms that Solid.js does, which is tagged template literals, hyperscript or transpiled JSX.

For example, it does not rely on function execution to generate a new view, ...

Sure it does, either by setting a reactive signal or writing into a setter function of a mutable store. It really seems to me that you haven't really looked into solid.js recently, but have a lot of false preconceptions about it.

Thread Thread
 
132 profile image
Yisar

I am very clear about solidjs. Its fine-grained update is completely inconsistent with the semantics of JSX's immediate mode. The semantics of hooks is to obtain new values every time it is rerender, and solidjs is completely distorted.
Think carefully and don't rush to defend.

Thread Thread
 
lexlohr profile image
Alex Lohr

I think you should have a look at Ryan's reply.

Yes, hooks do that because a reconciler requires it, but it's not a law that you must obtain new values all the time even if nothing changed and certainly a deviation from reactive patterns – which is why doing things different makes for great performance and even more control in your reactive code. There's a reason solid's primitives are called differently than react's hooks: to avoid confusion.

The issue I see here is that you have some preconceived notions about how things should work that are clashing with the improvements made by solid and therefore you don't like it. That's fine, everyone is entitled to an opinion. But that's all it is.

Thread Thread
 
132 profile image
Yisar

I clearly know the good and bad of each framework. Neither solidjs nor svelte can guarantee the absolute unity of semantics. This is a fact, not my preconception.

In addition, even so, solidjs has made remarkable improvements in many aspects, which I don't deny.

Thread Thread
 
lexlohr profile image
Alex Lohr

Good and bad are merely subjective value judgements. And as I already remarked, you see a division where there is none because you are used to a different concept. Neither your judgement nor your views are a fact.