LibreChat/client/src/store2/textSlice.js

20 lines
341 B
JavaScript
Raw Normal View History

import { createSlice } from '@reduxjs/toolkit';
const initialState = {
text: '',
};
const currentSlice = createSlice({
name: 'text',
initialState,
reducers: {
setText: (state, action) => {
state.text = action.payload;
},
}
});
export const { setText } = currentSlice.actions;
export default currentSlice.reducer;