'A non-serializable value was detected in an action, in the path: `payload.config.adapter`. Take a Look at the action
This is a Redux issue.
Take a look at the logic that dispatched this action: {type: 'users/handleverification/fulfilled', payload: {…}, meta: {…}}
export const UserValidation = createAsyncThunk( //This Function should move to another folder
'users/handleverification',
async(thunkAPI) => {
try{
//Logic
if(Authenticated.status === 201){
localStorage.setItem('token', Authenticated.data.token);
delete Authenticated.token;
return Authenticated
console.log("Test me",Authenticated.data);
}
}
catch(error){
window.alert("error");
if(NewUser){
//delete User????????
}
}
}
)
Here is the Create Slice function:
export const userSlice = createSlice({
name: 'user',
initialState: {
UserData: {},
isFetching: false,
isSuccess: false,
isError: false,
errorMessage: '',
},
reducers: {
clearState: (state) => {
state.isError = false;
state.isSuccess = false;
state.isFetching = false;
return state;
},
},
extraReducers: {
[UserValidation.fulfilled]:(state,{payload}) => {
// console.log("Fullfilled:")
},
[UserValidation.pending]:(state) => {
// console.log("Pending");
},
[UserValidation.rejected]:(state,{payload}) => {
// console.log("Rejected");
},
}
})
Why do I get the error:
A non-serializable value was detected in an action, in the path: payload.config.adapter. Take a Look at the action 'users/handleverification'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
