I friends, I develop react redux toolkit slice everything ok but in function dispatch not working send to dispatchUserBlockingUpdate function in react-dom.development.js where is the my problem ?
I look changeProfitSortType function get data when need to send dispatch(changeProfitSort) not work !
This is: sortingSlice.js
import {createSlice} from "@reduxjs/toolkit";
export const sortingSlice = createSlice({
name: 'sorting',
initialState: {
profitSortType: false,
},
reducers: {
changeProfitSort: (state, action) => {
state.profitSortType = action.payload;
//return { ...state, profitSortType: action.payload }
},
},
});
export const { changeProfitSort } = sortingSlice.actions;
export const changeProfitSortType = (data) => async dispatch => {
console.log(data);
let status = data.status;
console.log(status);
await dispatch(changeProfitSort(status));
}
export default sortingSlice.reducer;