thecodingmachine / redux-toolkit-wrapper

Redux-toolkit wrapper used to write less code regarding classic CRUD operations.
MIT License
19 stars 5 forks source link

Create a wrapper for RTKQ createApi #12

Open llaver opened 3 years ago

llaver commented 3 years ago

Is your feature request related to a problem? Please describe. RTK Query has been out for a while now. It would be really nice to have a wrapper for it similar to buildSlice that cleans up some of the usage. buildSlice is basically just a weaker version of createApi at the moment anyways.

Describe the solution you'd like a buildApi wrapper, similar to buildSlice

Describe alternatives you've considered I could replace buildSlice with createApi where needed, but then I lose out on the RTKWrapper usage.

JeremyDolle commented 3 years ago

Hi @llaver, when RTKQuery was release I reconsider the utility of this package. In fact RTKQuery is not a state management tool, it is for data fetching and it handle a lot of feature to make it reaaaally easy. Redux-toolkit-wrapper was made for the boilerplate in order to simplify the data fetching using Redux/Redux-toolkit. It works, it helps BUT not as RTKQuery does! So, since v3.1.2 the boilerplate was refactored using RTKQuery and not redux-toolkit-wrapper anymore because it's bettre and if we make a wrapper for it, it will not simplify anything.