4 ms·
Nothing like that has happened in the Angular ecosystem, the API is stable for 3 years, and a pleasure to work with. I think this obsession with functions and
by vfc1 7y ago
Nothing like that has happened in the Angular ecosystem, the API is stable for 3 years, and a pleasure to work with.
I think this obsession with functions and the functional paradigm is counterproductive in the React ecosystem.
Sometimes, the best way to represent something is a class. When you have some data and a series of closely related fucntions that modify the data and are highly related to the data, it's better to use a class.
This hooks API thing is anything but functional, way too much magic. Its stateful programming diguised as functional.
- csande17 7y agoIndeed, hooks are pretty much the furthest thing from functional programming there is. In functional programming, functions can safely be called any number of times from anywhere in the program, and they'll always return the same result for the same arguments. Hooks, on the other hand, crash and burn at runtime if you call them outside a React component function, or in a different order or number from how you called them the first time your component was rendered.