Replies: 1 comment 2 replies
-
Before we go deep into this - is there a specific reason you do not want to use RTK Query? You're essentially starting to recreate that. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I want to create a wrapped
createASyncThunk
call similar to this:This allows me to create a standardized function across my application which uses a lot of very similar parameters across all my async thunks.
This works great and all the TypeScript types are inferred as desired. However, if my wrapper becomes more complex (adds custom
getPendingMeta
orfulfillWithValue
like so:I was hoping to leverage the internal types that
@reduxjs/toolkit
uses, but it seems that the types I want aren't exported (eg.import type {GetPendingMeta} from '@reduxjs/toolit'
doesn't work).Any advice here would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions