You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating reducer by createReducer<State, Action> you not get same action type when using handleType and handleAction if your action was created by createAsyncAction.
You get action type: (parameter) action: { type: EActionTypes.FETCH_PROFILE_SUCCESS; payload: {}; } | PayloadAction<EActionTypes.FETCH_PROFILE_SUCCESS, IUser> and because that you get type error.
Description
When creating reducer by
createReducer<State, Action>
you not get same action type when usinghandleType
andhandleAction
if your action was created bycreateAsyncAction
.Mandatory info
How to Reproduce
Create reducer like so and you get type error:
You get
action
type:(parameter) action: { type: EActionTypes.FETCH_PROFILE_SUCCESS; payload: {}; } | PayloadAction<EActionTypes.FETCH_PROFILE_SUCCESS, IUser>
and because that you get type error.Create reducer like so and everything is ok:
Expected behavior
action
should be type:(parameter) action: PayloadAction<EActionTypes.FETCH_PROFILE_SUCCESS, IUser>
Suggested solution(s)
Project Dependencies
Environment (optional)
The text was updated successfully, but these errors were encountered: