tiefen_space_app/store/reducer.js

19 lines
415 B
JavaScript

import { createSlice } from "@reduxjs/toolkit";
export const appSlice = createSlice({
name: "app_reducer",
initialState: {
noticeCount: 0,
},
reducers: {
getNoticeCount: (state, { payload }) => {
state.noticeCount = payload;
},
},
});
// Action creators are generated for each case reducer function
export const { getNoticeCount } = appSlice.actions;
export default appSlice.reducer;