What I am trying to do: Fetch some data and then feed it to editProfileReducer with dispatch.
Draft is a union type of the three different states the reducer can be in. What am I doing wrong here?
It seems useReduceImmer is not treating the values of loadingStatus as its respective constant (e.g. loadingStatus: 'loading') but instead treats it as string.
What I am trying to do: Fetch some data and then feed it to
editProfileReducer
with dispatch.Draft
is a union type of the three different states the reducer can be in. What am I doing wrong here?It seems
useReduceImmer
is not treating the values ofloadingStatus
as its respective constant (e.g.loadingStatus: 'loading'
) but instead treats it asstring
.The above results in: