Hacker News new | ask | show | jobs
by chrisabrams 1975 days ago
OP didn't want to use hooks, so I showed an example that doesn't require hooks.

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-...