| >Isn't this the same company that wouldn't hire the homebrew author? I think you’re confusing it with Google. >I get the sense the only UI people who really know programming work on the React team I haven’t worked in many companies before, but I find my colleagues across the company to be very good UI engineers. Not sure where you got that impression. >I'm a bit dumbfounded about the "this" and "class" confusion concern as well In the grand scheme of things it’s a pretty minor concern (although people do tend to overfocus on it because it’s easiest to explain and discuss). The motivation for Hooks is: * Share reusable stateful and effectful logic between components. Like mixins but without name clashes or the diamond problem. Hooks can be applied more than once, and are instantiated per call. * Colocate related logic instead of artificially splitting it into lifecycle methods. * Accurately model component as being in multiple states at the same time for concurrency. (Important for future React features.) Closures can do that because they capture specific props and state. Finally there are some difficulties related to optimizing class code at compilation time. Such as inlining and fusing classes together. Functions make this simpler and they also minify better due to safer mangling. All of these motivations can be challenging to explain. So people tend to overfocus on “this”. I also wrote this, let me know if it helps: https://medium.com/@dan_abramov/making-sense-of-react-hooks-... |
Indeed!
> All of these motivations can be challenging to explain. So people tend to overfocus on “this”.
> I haven’t worked in many companies before, but I find my colleagues across the company to be very good UI engineers. Not sure where you got that impression.
It has its own section on the Introducing Hooks page :) https://reactjs.org/docs/hooks-intro.html#classes-confuse-bo... .
I can't recall if I've seen it brought up in other "official" channels, but it does certainly get talked about a lot in discussions such as this and I believe that's because of information sources such as the link. I will defer to you on the real situation, but I think hearing about classes and "this" being confusing, coming from React, is where people might wonder what's going on. Mentioning it at all may have caused a large distraction as people latch onto it as you say, and find the situation a bit incredulous.