/** * @format */ import { createSlice, PayloadAction } from '@reduxjs/toolkit' export interface MapState { value: any } const initialState: MapState = { value: '' } export const mapSlice = createSlice({ name: 'mapObj', initialState, reducers: { increment: (state: any) => { state.value += 1 }, setMap: (state: any, map: PayloadAction) => { state.value = map } } }) export const { increment, setMap } = mapSlice.actions export default mapSlice.reducer