|
|
|
|
|
by purple-again
1975 days ago
|
|
Why use classes instead of functions. Isn’t the React ecosystem moving away from classes entirely? I remember hearing somewhere that a core maintainer of React stated we should be using function components everywhere now. |
|
I'm aware some of the React community use hooks, some of us still use classes. Classes provide a better interface when dealing with state that is shared between parent and child. This is a write up much better than I can explain: https://react-redux.js.org/api/hooks#stale-props-and-zombie-...