我需要将当前状态重置为初始状态,但是我的所有尝试都失败了。我该如何使用Redux Toolkit实现它?
const showOnReviewSlice = createSlice({
name: 'showOnReview',
initialState: {
returned: [],
},
reducers: {
reset(state) {
//here I need to reset state of current slice
},
},
});