Replies: 2 comments
-
I believe you actually want to write your own RTK Query module: https://redux-toolkit.js.org/rtk-query/usage/customizing-create-api#creating-your-own-module That way you also don't need to wrap your apis, you add more functionality to |
Beta Was this translation helpful? Give feedback.
0 replies
-
I had totally missed this. I'll check it out, thank you!
…On Wed, Jun 5, 2024 at 2:57 AM Lenz Weber-Tronic ***@***.***> wrote:
I believe you actually want to write your own RTK Query module:
https://redux-toolkit.js.org/rtk-query/usage/customizing-create-api#creating-your-own-module
That way you also don't need to wrap your apis, you add more functionality
to createApi.
—
Reply to this email directly, view it on GitHub
<#4444 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHXUXZ3HDBJRB53JGCKFOB3ZFYEYXAVCNFSM6AAAAABIZAKOGSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TMNRYGYYDC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi!
i'm trying to wrap the
api
object returned bycreateApi
with a custom function so that i can add more hooks to it. here's what i have so far:and use it like:
i think the logic is good but the ts typings are not working. i'm currently getting this:
it would also be nice if it's able to auto-suggest the new hooks in
export const { ... } = withEnhancedEndpoints(anotherApi);
but i'm not sure how to do thati'm not an expert on ts, so any ideas or suggestions to resolve this issue would be greatly appreciated. thank you!
Beta Was this translation helpful? Give feedback.
All reactions