5 ms·
Tangentially, who else misses the time when React was just a side project by FB? Increasingly it seems to be led by Vercel who makes profit from React-based so
by throwaway290 3y ago
Tangentially, who else misses the time when React was just a side project by FB? Increasingly it seems to be led by Vercel who makes profit from React-based solutions.
- yieldcrv 3y agowhat do you miss about that? prehooks world was horrible and Nextjs has no vendor lock
- yawnr 3y agolol pre hooks world was fine. Hooks are great but react took over the world because of the clarity of class component lifecycles. If hooks were there from the start it wouldn’t have been as popular. Also Vercel/NextJS is like if DHH was charging people to use Rails. We are in the “enshittification” part of react development.
- whoknowsidont 3y ago>because of the clarity of class component lifecycles. is this satire?
- throwaway290 3y agoAh, the clarity of useEffect(() => { return () => { handleUnmount() } }, [])! How did they manage to live with the ugly componentWillUnmount() { handleUnmount() } for all those years? (By the way, don't forget that [] or it does a completely different thing that you never want.)
- yawnr 3y agouseEffect is the biggest source of bugs in any react codebase bar none
- shmde 3y agoI started off with hooks and started learning about class components just to clear interviews and damn it provides clarity of when, how components are gonna re-render. If you can get past the HOC hell hole and the "this.add = this.add.bind(this)". I felt it made it very clear how and in what order things run. Its definitely true when OP said if things did not get so clear with class components we would never have gotten hooks.
- whoknowsidont 3y ago> I felt it made it very clear how and in what order things run. I'm sorry, the entire community rallied around hooks PRECISELY because the life cycle methods were not clear and were very problematic. It seems extremely strange to see such opinions. When you see a hook you know exactly when it's going to execute and why and because of what. You don't have to layer the methods with tons of checks making sure the life cycle method has been run in the right context, it literally just works.
- yawnr 3y agoHooks gained momentum because of advantages in composability and removing a lot of pain with HOCs. Brevity also helped. The obfuscation about re-renders and memoization of variables is absolutely a downside that I see junior devs really struggle with all the time — something that “just works” with class components. Anyway, both are fine and usable haha. Just think there are arguments to be made on both sides.
- yawnr 3y agoFor what it’s worth there is a babel plugin to auto bind arrow functions as methods so you never have to do this.
- bornfreddy 3y agoNo. Hooks have their advantages over classes, but readability is not one of them, by far.
- the_mitsuhiko 3y ago> Nextjs has no vendor lock It's complicated. If you want the vercel like experience of deploying to a serverless environment it's not as trivial. There is a reason that open-next exists.
- mstade 3y agoIt's actually not that hard to be honest, their Docker examples are pretty good and well accessible from the documentation. Where have you gotten stuck?
- sophiebits 3y agoDespite a few shuffles in employment, it’s many of the same people.
- throwaway290 3y agoIf React powers your dev platform then you may not want React to be particularly powerful and easy to use. Otherwise some people will just use React directly and other people will build their platforms on top of React and undercut your platform. Financial incentives are a powerful thing
- solardev 3y agoIf Meta wanted to, they could've expanded it themselves. They didn't, hence all these other companies. Between MUI and Next and RTK-query, IMO, React is finally approaching something usable and complete. Not a React fanboy. I loved Angular v1, in fact. Just hate how minimalist and useless vanilla React was. Edit: And maybe this is a problem of scale too. At Meta's size or similar, React is just one component and one team that works alongside dozens of others to deliver a working product. But when they open source it, smaller companies and individuals also try to use it but without Meta's scale and resources. And they inevitably find it lacking because they don't have whole teams working on the rest of the problem (like basic routing, which Meta handles in their derivative of PHP, I think?) , so they have to hope someone else (like react router) solved that problem in a drop-in way. That's why Next is so magical for small and medium businesses; they do a lot of that curation and infra building for you, for a reasonable fee.
- solardev 3y agoI definitely don't. IMO Next/Vercel is a better steward of React than FB was, and turned it into an actual framework usable for a site, not just a UI lib that took ten thousand other libs to make a website out of. The React world is quickly standardizing around Next as most of its stack (maybe with a state manager thrown in if useContext isn't enough) and that makes life a hell lot easier. And being a Vercel customer has been wonderful. Their systems are so much nicer to work with than legacy web stacks/VMs/containers, or trying to hook something up in PHP or Java. The dev ex is awesome, being able to `create-next-app` and deploy to Vercel in like 3 minutes.
- JUNGLEISMASSIVE 3y ago[dead]
- yieldcrv 3y ago100% agreed
- zoover2020 3y agoI dont disagree but isn't this the point of their strategy? I.e. lure everyone in to only vendor lock-in later on?
- yieldcrv 3y agoyeah probably, even if the current team doesnt want that, a board member or future executive will push for it and do it currently, deploying on vercel is so easy and the project structure works on any other compute instance that migrating away will be easy too, and breaking versions of Next or NextAuth can just not be used
- solardev 3y agoHow is this much different from being locked in to AWS or Docker Desktop or Oracle's Java or MySQL or WordPress or Cloudflare or OpenAI? Vercel is a business with a very good value proposition. And Next is open source with a huge community. It's not perfect, and Vercel isn't perfect, but among its peers (the web industry) it stands out to me as one of the two companies I'd trust to steward the future of the web (the other being Cloudflare). Way way way more so than Meta or Google, because at the end of the day at least these companies are selling good web hosting, not shitty advertising, and aren't run by total dicks either. Do I wish they were nonprofits with shared governance? Yeah, maybe. But short of that, their track record has actually been incredible. The web is still immature enough (surprising, I know) that new companies and technologies rise and fall all the time. Today's vendor lock-in is tomorrow's opportunity for another young upstart, the same way Next was to React, the way React was to Angular, the way Angular was to the frameworks before it. I'm not too worried. It doesn't make sense to be afraid of Next when it's really just repackaged cloud hosting in a very shiny wrapper. They resell AWS and GCP and Cloudflare infra at a markup but make it much much easier to use. It's a win win for everyone as far as I can tell.
- quickthrower2 3y agoHow does Remix fit into this?
- solardev 3y agoNext saw it as a significant threat and copied some of their ideas, I believe.