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“?
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.