5/9/2026 at 1:32:40 AM
R2S was a painful one, but Lachlan was a dream of a security researcher to partner with. Not just from a responsible disclosure POV, but things like hopping on multiple calls with Meta and our team to help us validate remediations. Thank you Lachlan for helping make the internet safer (and great job on figuring out this 'labyrinth' of a vulnerability)by Rauchg
5/9/2026 at 11:03:34 AM
[flagged]by owebmaster
5/9/2026 at 7:05:13 PM
You can't attack another user like this here, so please don't.It's particularly bad when someone shows up to discuss their work and commenters take the opportunity to attack them. That's a mob dynamic, and we don't want those here.
It also strictly worsens the site because it gives people a disincentive to contribute in precisely the areas they know the most about. I've been trying to explain this for years: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
by dang
5/9/2026 at 11:10:39 AM
React was ruined from the moment they abandoned class components and introduced hooks. Vercel is just continuing the trend of hype against common sense.by halflife
5/9/2026 at 2:03:51 PM
You are probably a Javascript dev, not doing typescript? Classes were horrible to type for, especially when you tried higher-order components. Hooks removed so much clutter and friction and allows pretty well-typed components and higher order functions (i.e. hooks that return components).by littlecranky67
5/9/2026 at 3:56:40 PM
Hooks made simple things simpler, but hard things harder, code with lots of boilerplate was replaced with code with leaky abstractions full of various workarounds - I don't think this is a good trade.While I hate class component lifecycle methods they are much better than complex hook setups when solving more advanced problems.
by Sankozi
5/9/2026 at 5:55:21 PM
Could you elaborate why you dislike lifecycle methods? I read this take a lot and I use mainly angular but did some smaller projects with react class components and with function components. I also think function components are very counter intuitive but I also never had anything against lifecycle methods.by b4ckup
5/10/2026 at 7:34:05 AM
They often require quite complex ifology for simple use cases. Also didmount and diduptade often needs to be overriden together only to have almost the same implementation. They also have some gotchas regarding state updating inside them.by Sankozi
5/9/2026 at 4:01:16 PM
Just having an interval inside a component used to be trivial, but with hooks becomes tedious. Only the barebones simple ultra basic stuff became simple. Everything else? Harder.by halflife
5/9/2026 at 3:25:43 PM
Yes, they were uglier but they had advantages that got lost such as an easy to control rendering life cycle.Just opening dev tools on MIT-written big tech corps and startups confirms nobody is able to write good websites or applications that arent filled with performance and memory leaks.
by epolanski
5/9/2026 at 4:00:05 PM
I am all around developer, working with typescript from at least 2015.I’m not exactly sure what complication you mean. Lifecycle method sucks, yeah, but you replaced them with lifecycle hooks. So the same mental overhead but now in a pseudo stateless functions, with state full escape hatches.
by halflife
5/9/2026 at 12:25:57 PM
I just don't understand this take, every time I hear it I wonder if people just haven't spent the time to adjust their mental model.Hooks are IMO the best thing that happened to react.
by ervine
5/9/2026 at 1:35:28 PM
I have spent more time than I wished for on React debugging tools, and useXXXX spaghetti calls.by pjmlp
5/9/2026 at 3:00:04 PM
You can write spaghetti with class components, too. Doesn't sound like a hooks issue to me.by ervine
5/9/2026 at 4:18:54 PM
Of course, the only question is in what way the programming language pushes you. You can TS code where every variable is assigned “any” type, that would void all type safety. Is it possible? Yes. But someone needs to bend the languages will to do that.Classes have inherent state, and methods which encapsulate logic. That pushed you to create separate logic bundles.
Functions are callable scripts. There are no rules. I’ve seen too many components that invoke tens of hooks, and hundreds of lines of state management. Most classes I’ve seen never reached that. Were there classes that were too big? Of course, but at least there was logic separation with methods.
by halflife
5/9/2026 at 5:04:58 PM
The great sin of the migration to hooks was that the docs were so poorly written that everyone got into bad habits.You can have self documenting state like class components in the form of reducers which are just state machines. But it is much later in the documentation.
by bobthepanda
5/9/2026 at 3:05:47 PM
I certainly can, but somehow it cooler to write lambdas upon lambdas, and other Haskellisms when using hooks.by pjmlp
5/9/2026 at 3:36:40 PM
I think we're just gonna agree to disagree. Cheers.by ervine
5/9/2026 at 4:07:14 PM
I’ve done plenty of hooks. Also class components. Also angular.You are writing code for an object that is inherently stateful, in a stateless design pattern. Instead of embracing state, you crate escape hatches and plugins to tap into your state, and then more escape hatches inside those escape hatches to tap out.
It’s react rendering model leaking into your code. Let’s imagine react changes the rendering paradigm, and components are rendered once with only state updates. Almost all of your hooks become useless. The fact that you need to think about react internal every time you create a component is such a bad API choice that I’m amazed it still exists, and being expanded.
by halflife
5/9/2026 at 4:15:16 PM
So your argument is that instead of explicit class component methods, hooks are implicit based on understanding the react rendering model?I guess so - but react could also change (and I think did at some point) how their class methods work, how often they're triggered, and when.
I don't understand the stateless comment - hooks are as stateful as you make them, using useState or useContext or any of the other ways of maintaining data between renders.
by ervine
5/9/2026 at 4:36:42 PM
Classes are inherently stateful. A class instance is a long lived object. Functions are not, a functions internal state is thrown the moment the function returns. What react ask you to do is to attach to external state inside the function, in other words, an un pure function, forego idempotency.In class based components, you didn’t care how react works under the hood, except for the render method which is called by react. So the surface of code controlled by react was only what you included inside that method. In function components, the entire function is owned by the renderer, so you need to deeply understand how it works.
by halflife
5/9/2026 at 5:34:50 PM
I guess I think it's table stakes to need to deeply understand how the framework you're using works. Lifecycle methods vs. hooks, you still gotta know what's doing what and why.by ervine
5/9/2026 at 6:12:13 PM
Of course, but that really depends on the level of expertise and the type of programmer you are, and to some extent, the attitude of the organization your in to code and refactoring.When everyone around writes shit code, you don’t care. In hooks, it becomes much more critical.
by halflife
5/9/2026 at 6:37:38 PM
No, writing shit in react is gonna be a nightmare regardless of paradigm. HoC, Class Components, render props, whatever - if you don't know what you're doing and react internals are magic to you, it's game over. Anyway, we can agree to disagree on hooks vs. classes. Cheers.by ervine
5/9/2026 at 8:08:03 PM
Agreed. In the end, I always say that every line of code has deadline in which it will be removed.by halflife
5/9/2026 at 1:33:24 PM
Spot on, incredible how OOP hate can mess up a framework.Vercel, the only thing they have going for the app model mess, are the partnerships with SaaS vendors that make them the must go tooling.
However this will eventually come to an end.
by pjmlp
5/9/2026 at 3:02:39 PM
It wasn't OOP hate, it was hatred of splitting functionality across a number of methods rather than putting it in a single (reusable, sharable!) hook and having your component consume it.by ervine
5/9/2026 at 3:06:52 PM
Yeah, because now is so much better....I only touch React now, because of SaaS partnerships with Vercel.
Otherwise I pretend it doesn't even exist.
by pjmlp