UNPKG

@rtbjs/use-state

Version:

`@rtbjs/use-state` is a state management tool that can act as a local state and be easily turned into a global redux state. It is an innovative approach to state management that combines the advantages of both React's useState and Redux's state management

19 lines 671 B
"use strict"; exports.__esModule = true; exports.setParentReduxState = exports.reduxHistorySlice = void 0; var toolkit_1 = require("@reduxjs/toolkit"); var initialState = { parentReduxState: '' }; exports.reduxHistorySlice = (0, toolkit_1.createSlice)({ initialState: initialState, name: 'reduxHistorySlice', reducers: { setParentReduxState: function (state, action) { state.parentReduxState = action.payload.parentReduxState; } } }); exports["default"] = exports.reduxHistorySlice.reducer; exports.setParentReduxState = exports.reduxHistorySlice.actions.setParentReduxState; //# sourceMappingURL=redux-history-slice.js.map