3 ms·
ryan, is a cool guy. but I feel like a lot of work they're doing on marko, will be much better than solidjs. solidjs api is non-intuitive, same as the reactive
by dzonga 5y ago
ryan, is a cool guy. but I feel like a lot of work they're doing on marko, will be much better than solidjs. solidjs api is non-intuitive, same as the reactive system say compared to svelte.
Hooks are already a bad idea in react, for reasons I will not expand on. And having the same concept in solidjs isn't progress at all.
Svelte nails reactivity, it's something you don't think about.
- richeyryan 5y agoI think you need to take a second look at Solid. It isn't subject to the same "rules of hooks" as React so hooks are really just functions that return reactive units. You could argue writable and readable are just hooks for creating stores. It's reactivity is fairly similar to Svelte from there. There are stylistic choices with Solid choosing a function style and Svelte abstracting that with proxies and allowing a mutation style but otherwise how the reactivity works is close. I do agree that Marko is quite promising. I think quite a few sites that need server rendered markup and progressively enhanced features could be implemented more simply in Marko than the equivalent solutions with React, Svelte or anything else.
- alserio 5y agoSvelte doesn't really use any kind of proxy. It instruments its code with explicit invalidations and scheduled updates. Mutations are tracked "lexically" intra-component with static analysis or with explicit functions when using stores
- richeyryan 5y agoYou're right, I think I meant something more like proxy style mutation. It does of course compile down to functions operating on stores which is even more like Solid
- ryansolid 5y agoSomething you don't need to think about until well, you realize reactivity leaves templates and you need to write a store. Or that you have large data and need things to only update piecewise. Or you need to hoist things out into functions. Svelte has done an amazing job with its compiler but there are considerations you need to understand with its reactivity. Solid does not have Hooks or Hook rules. They look similar but execute more similar to say Svelte. Although Svelte still is about Component re-renders and Solid's reactivity is more granular hence the performance improvement. This area of DSLs is very superficial for the most part. I think people have preferences and I'm exploring both sides between Marko and Solid but saying things like unintuitive I think mischaracterizes things. Maybe explicit, transparent, transferrable, and composable are better adjectives that apply more to Solid than to Svelte that you can use in the future.