3 ms·
@reduxjs/toolkit is absolved most, if not all, of the boilerplate. It's been a joy to use.
by halfmatthalfcat 4y ago
@reduxjs/toolkit is absolved most, if not all, of the boilerplate. It's been a joy to use.
- andix 4y agoYeah, it got much better now. But since react query and swr I think most applications don’t need state management anymore. If you have complex state, it makes sense. But just to fetch/refetch some queries redux is overkill. Most redux (and also angular ngrx/ngxs) projects I’ve seen, are just over engineered. They solve an easy task in a very complicated way.
- halfmatthalfcat 4y agoI find using query/rtk/etc to be more trouble than they're worth tbh. It's more black-boxing then I'm comfortable with, personally. I want my side effects explicit. I've found a lot of success with redux/redux-observable which is super clean, at least for me.
- andix 4y agoOkay, for me the functionality of those libraries is quite straight forward. You can just turn on/off whatever you need with one setting. But usually the defaults is what you want. Your user is on a bad connection? Automatic retries are what you get and what the user needs. You user just got back online? React query notices that event and refetches the failed queries. You need all those features turned off? Just turn them off in the config object.