Error: The slice reducer for key “auth” returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don’t want to set a value for this reducer, you can use null instead of undefined.
Cause: switch (action.type) is not set default
export default function authReducer(state, action) {
switch (action.type) {
case SIGNUP:
return {
...state,
signup: {
loaded: false,
success: false,
}
}
default:
return state;
}
}
Read More:
- [Solved] RuntimeError: Error(s) in loading state_dict for FasterRCNN: Missing key(s) in state_dict:……
- [Solved] Schema initialization FAILED Metastore state would be inconsistent
- [Solved] RuntimeError: Error(s) in loading state_dict for Model: Missing key(s) in state_dict
- [Vagrant] When vagrant up, it stops at “SSH auth method: private key” and times out.
- GCC Error:(.text+0x24): undefined reference to `main‘collect2: error: ld returned 1 exit status [Solved]
- openlayers — Cannot read property ‘slice‘ of null—Map cannot be loaded
- Go Slice Error: panic:runtime error:index out of range [0] with length 0 [Solved]
- [Solved] VScode Error: undefined reference to ‘WinMain’ collect2.exe: error: ld returned 1 exit status
- [Solved] Initialization error encountered by JUnit unit test: Method initialization error not found
- [Solved] KEIL Run Error: \KEY.axf: Error: L6218E: Undefined symbol EXTI_ClearITPendingBit (referred from exit.o).
- [Solved] Canal 1.1.5 Startup Error: caching_sha2_password Auth failed
- [Solved] Cannot read properties of undefined (reading ‘ajax‘); Cannot read property ‘ajax‘ of undefined
- [Solved] VUE Use Filters Error: [Vue warn]: Error in render: “TypeError: Cannot read property ‘toFixed’ of undefined”
- E11000 duplicate key error collection: *** index: _id_ dup key
- [Solved] Gitee generates public key error: Enter file in which to save the key…
- [Solved] Flyter uses screenutil to obtain screen width and height initialization error
- [Solved] SecureCRT Error: Key exchange failed. No compatible key exchange method.
- DevC++ Error: [Error] Id returned 1 exit status [How to Solve]
- [How to Fix]Type error: must use keyword argument for key function
- Type error: must use keyword argument for key function