Files
Superalgos/Desktop/store/slices/Example.slice.js
T
Axel 577fb7cfab Integrate React frontend for desktop app
* Added component files
    * Added dependencies and settings on package.json
    * Updated package-lock.json to match new dependencies
    * Added react scripts and config files
2021-11-28 19:55:43 -03:00

22 lines
467 B
JavaScript

import { createSlice } from '@reduxjs/toolkit'
export const ExampleSlice = createSlice({
name: 'example',
initialState: {
exampleName:'',
token:''
},
reducers: {
exampleAction: (state, action) => {
state.userName = action.payload;
},
},
})
// Action creators are generated for each case reducer function
export const { exampleAction } = ExampleSlice.actions
export default ExampleSlice.reducer