4 ms·
I think this should lead you to re-evaluate your assumptions about hooks, because there is a reason why React has blown Angular out of the water. The reactive h
by phailhaus 5y ago
I think this should lead you to re-evaluate your assumptions about hooks, because there is a reason why React has blown Angular out of the water. The reactive hooks model of UI development is successful because it allows you to write almost any component as a stateless function with well-defined side-effects. Yes, it requires a different way of writing them, but it's worth it for complex applications.
The fact that hooks like usePromise and useInterval can be trivially written on top of standard web APIs and guarantee that your component hierarchy will update consistently without dealing with internal state is a groundbreaking achievement. I think you are focusing too much on the fact that hooks like usePromise exist, instead of on what they enable.
Have you ever used usePromise, and seen how it turns a stateful object into a stateless one? It has never been so easy to encapsulate asynchronous state.
- mikojan 5y ago> ...there is a reason why React has blown Angular out of the water. - The ensuing paragraph suggests you are conflating Angular with AngularJS. Angular is build on top of proper, standard FRP and stream processing primitives. It is "reactive". - Angular is in widespread use in the enterprise world. - The reason ReactJS is much more prevalent everywhere else is it has no barrier of entry. None at all. This, however, is irrelevant with regards to the issue I am raising. I am complaining about the complexity ReactJS dumps on working professionals. - I am not advertising Angular. I am telling you that EVEN Angular manages to suck less. > The fact that hooks like usePromise and useInterval can be trivially written on top of standard web APIs ... Again, not: "can". "Must"!!