2 ms·
Those are tradeoffs. Lifecycle methods had pros and cons. Hooks have other pros and cons. Lifecycle methods had the right pros and cons for most devs. Hooks are
by Sammi 4y ago
Those are tradeoffs. Lifecycle methods had pros and cons. Hooks have other pros and cons. Lifecycle methods had the right pros and cons for most devs. Hooks are horrible for new devs, as they have to many gotchas, and there far too many people that just don't have the time to learn all the footguns of hooks.
So lifecycle methods had some other drawback? Yes, sure, but they were less than the drawbacks of hooks for most people.
- chrisweekly 4y agoWe're agreed that nearly everything has pros and cons. But these confident assertions about what's "right" or "horrible" are subjective, personal preferences. And unsubstantiated claims that they apply to "most devs" or "most people" is merely a projection. That contradicts my direct experience (I've never encountered a single team that adopted hooks and went back). Hooks' adoption rate (along w React's market share) suggest I'm not an outlier. All that said, I'm glad TMTOWTDI. I also want to pause and thank you for sharing your perspective; dissent is valuable and helps prevent groupthink. Have a great day!
- Sammi 4y agoIt's hard to leave hooks when you are using React, as they are everywhere. What people do instead is use something else next time they start a project. Just look at the exponential growth of Solid: https://npmtrends.com/solid-js https://npmtrends.com/solid-js This will happen fast. I'm not even using Solid - I like the html first approach of Svelte - but the writing is on the wall. The data is saying as much. I was using Angular in 2013 when React came around. I knew Angular was dead as soon as I saw React. Took the Angular people many years to realize this, and many still haven't. I'm saying React is already dead. Svelte and Solid killed it. It will take a few years to play out, but you can see it happening already if you pay attention. The React devs are doubling down on the inherit complexity of React instead of cleaning it up - this is exactly what killed Angular and made people move on to something simpler. I am extremely confident that this comment will age well, but we'll see :D
- deleted 4y ago[deleted]
- dalmo3 4y ago> Just look at the exponential growth of Solid How can you be so sure that growth isn't just riding a larger wave of web dev growth in general? Remix react and has a steeper curve: https://npmtrends.com/@remix-run/react-vs-solid-js https://npmtrends.com/@remix-run/react-vs-solid-js Nextjs is still growing fast. What's the stats of Solid apps in production vs people just doing tutorials?
- Sammi 4y agoThe steep curve of Remix is really beautiful. One possible way of interpreting it is that it is coasting of React, and isn't starting from as low a starting point as Svelte and Solid have to. Just the mere fact that Solid is showing a hockey stick curve, and that it is so different from React is what has me convinced.
- chrisweekly 4y agoSure; Svelte and Solid look promising. And for those of us who like TSX and the better parts of React, Remix's embrace of web fundamentals and its relative simplicity are a breath of fresh air. It's powerful and intuitive, with a really well-designed set of features that represent a coherent paradigm. The return to web fundamentals -- eg its approach to forms -- resonates deeply with me and my peers (building websites and apps for a living since 1998). A rising tide lifts all boats, and I'm glad there are choices.