Redux Toolkit isRejectedWithValue listening to all from imported file

Viewed 19

So I'm wanting my isRejectedWithValue to match with all exported functions from my thunk file. I could call each one individually, but that would be many. Is there a way I could do something like this?

import * as fooThunks from './thunks/fooThunks
const rejectFoo = isRejectedWithValue(...fooThunks)

I've tried using Object.values to no avail

0 Answers
Related