Hacker News new | ask | show | jobs
by awesomepeter 2231 days ago
Couldn't you do the same thing with class components though? From what you've mentioned it seems you've mostly moved complicated logic into reducers. I may misunderstand though.
1 comments

>Couldn't you do the same thing with class components though?

Sure. But the point is that the entire class syntax becomes superfluous once you do that. Everything becomes a pure functional component, and you can just throw in a `useEffect` wherever the need for lifecycle based side effects arises.