Overall I think React hooks are an improvement. My codebase is usually shorter and there is a lot less typing involved. But hooks creates abstractions the developer needs to deal with that never existed before. Hooks are not functional because they break referential transparency of functions. You have to track dependencies manually and hooks are more difficult than they need to be for the "componentDidMount" equivale…
> The positional order seems like it would be easy to work around if they allowed you to pass in a key. Not sure why that isn't available. IIRC it's because they implemented their own method lookup table (!) to associate with the Component object (!) but as a FIFO queue, more or less. I assume either for ideological (that's how they wanted it to work) reasons or because they (probably correctly) reasoned that loading…
But React has deviated so far from both the OOP, FP, and traditional programming paradigms that now it kind of feels like hacks are needed to compensate for hacks.