mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
feat: use recoil to replace redux feat: use react-native THIS IS NOT FINISHED. DONT USE THIS
19 lines
341 B
JavaScript
19 lines
341 B
JavaScript
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;
|