There are other ways to approach an issue beyond shoving everything into a class. I'm not sure I really like the new hooks over the state methods at that level since I tend to separate global state (redux) vs component state (class) vs component state rendering (functional component).
In the end it depends on your style. I think this might be useful in a way that can be more pure than some other methods might be.
In the end it depends on your style. I think this might be useful in a way that can be more pure than some other methods might be.