3 ms·
I don't buy the way things are done in this library (constate). I wouldn't import a library just for doing this. It is not very hard to achieve the same with pl
by wawhal 8y ago
I don't buy the way things are done in this library (constate). I wouldn't import a library just for doing this. It is not very hard to achieve the same with plain `useContext` and `useState` directly.
That being said, I don't agree that hooks are futile, because, using hooks, your state logic can be reused. For example, if your app uses 10 independent counters (with different render logic and different styling), hooks are definitely useful to reuse the state logic.