News for hackers. Stuff that matters.
Re:How we built Hydrogen, a React framework for building cus... by BigJono on Friday June 24, 2022 @12:00AM (#31857678)
You have no idea what you're talking about. JSX is a line for line transform. It's literally the simplest implementation of templating that's even possible. The next step is just not having any sort of transform or build time and representing your DOM structure as JS code (which is also an option in React and what a lot of other smaller libraries do).

Your entire argument is arguing for React, not against it.

It makes no sense that you complain about magic then ask why dependencies need to be passed into hooks. How do you think other libraries avoid that quirk? Magic. Computed properties in Vue are opaque build time magic. Templates are build time magic. React is the only library that doesn't have build time magic that you need to treat as a black box.

Re:How we built Hydrogen, a React framework for building cus... by j-krieger on Friday July 01, 2022 @07:14PM (#31954263)
Amen. I really think that I‘m taking crazy pills when people say JSX is more magic than other frameworks custom templating. How the hell is a for loop inside { } less magic than „v-for“? How is a property in a magic computed object less magic than a pure javascript „useState“ function that is dead simple to explain? How is magically rebinding a variable to a function via a compiler less magic than manually calling said function to do it yourself? And how is setting an event handler yourself less magic than using „on:effect“?
Re:How we built Hydrogen, a React framework for building cus... by tbezman on Friday June 24, 2022 @12:33AM (#31857835)
you fucking nailed this. thanks for writing this out so i didn't have to