Solid.js feels like what I always wanted React to be
31–40 of 444 posts
Re: Solid.js feels like what I always wanted React to be
#32Re: Solid.js feels like what I always wanted React to be
#33What was wrong with the class component? It was very understandable and predictable.
Hooks allow you to bundle code together by functionality, and consequently allow you to easily extract and share said functionality in a very composable way.
This is my go to for visualizing the difference: https://i.imgur.com/e9K8vfz.gif
Re: Solid.js feels like what I always wanted React to be
#34What was wrong with the class component? It was very understandable and predictable.
Re: Solid.js feels like what I always wanted React to be
#35Earlier quoted context omitted.
https://www.solidjs.com/docs/latest/api#control-flow For reactive control flow to be performant, we have to control how elements are created. For example, with lists, a simple map is inefficient as it always maps the entire array. This means helper functions.
This feels like we're trading complexity here for complexity there, and it seems impossible to judge which way is actually "better". I use loops in React all the time but only have used `setInterval` in a component a handful of times..
I don’t see the big deal here. Error boundaries, suspense, context, very popular routing libraries all have used components to encapsulate functionality. That’s to say first party and third party functionality in the React ecosystem have gone down this path.
Re: Solid.js feels like what I always wanted React to be
#36I swear we're just going around in circles because people only have a surface level understanding of these front-end frameworks, and the challenges with building at scale. react isn't about 'hooks', 'jsx', 'top-down-state', or 'component-driven architecture'. All these frameworks are component-based, can have top down state only (or do bottom up in react), can use things like jsx/hooks because it's just syntactic sug…
The actual article acknowledges that when it's read: "React isn’t truly reactive."
And the author also claims to love React and to think it made things better.
You're arguing with phantoms.
Re: Solid.js feels like what I always wanted React to be
#37I swear we're just going around in circles because people only have a surface level understanding of these front-end frameworks, and the challenges with building at scale. react isn't about 'hooks', 'jsx', 'top-down-state', or 'component-driven architecture'. All these frameworks are component-based, can have top down state only (or do bottom up in react), can use things like jsx/hooks because it's just syntactic sug…
The thing is that While react is against side effects, javascript is not. Which result in these impedance mismatch where what devs want is against react itself. Vue/svelte/solid do not fight against js, hence they do not end up in similar situation
Re: Solid.js feels like what I always wanted React to be
#38Earlier quoted context omitted.
React hooks are footguns
Vue hooks avoid the closure/scoping issue mentioned in the doc. Very similar conceptually, but I find Vue's implementation a bit nicer to use
Re: Solid.js feels like what I always wanted React to be
#39I am extra skeptical of any framework that needs 50mb memory baseline.
I am triple skeptical of anything that uses brand-new packages and components like legos.
*Iterations on React are welcome.*
Re: Solid.js feels like what I always wanted React to be
#40I am fundamentally skeptical of anything that needs a runtime for anything other than security and profiling. I am extra skeptical of any framework that needs 50mb memory baseline. I am triple skeptical of anything that uses brand-new packages and components like legos. *Iterations on React are welcome.*