Hey there, I'm encountering an issue with my estlint:
Assignment to property of function parameter 'state'. eslintno-param-reassign
It's pointing to this particular code snippet:
state.sideisOpen = action.payload;
interface SideBar {
sideisOpen: boolean;
}
const INITIAL_STATE: SideBar = {
sideisOpen: true,
};
const sideBar = createSlice({
name: 'toggleSide',
initialState: INITIAL_STATE,
reducers: {
toggleSide: (state, action: PayloadAction<boolean>) => {
state.sideisOpen = action.payload;
},
},
});
export const { toggleSide } = sideBar.actions;
export { sideBar };