geothermie-atlas/redux/resourcesEWSSlice.js

21 lines
445 B
JavaScript

import { createSlice } from '@reduxjs/toolkit';
const initialState = {
value: [],
};
export const counterSlice = createSlice({
name: 'resourcesEWS',
initialState,
reducers: {
updateResourcesEWS: (state, action) => {
state.value = action.payload;
},
},
});
// Action creators are generated for each case reducer function
export const { updateResourcesEWS } = counterSlice.actions;
export default counterSlice.reducer;