@yext/chat-headless
Version:
A state manager library powered by Redux for Yext Chat integrations
31 lines (26 loc) • 782 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var toolkit = require('@reduxjs/toolkit');
const initialState = {};
/**
* Registers with Redux the slice of {@link State} pertaining to
* meta attributes of Chat Headless.
*/
const metaSlice = toolkit.createSlice({
name: "meta",
initialState,
reducers: {
setContext: (state,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
action) => {
state.context = action.payload;
},
},
});
const { setContext } = metaSlice.actions;
var metaReducer = metaSlice.reducer;
exports.default = metaReducer;
exports.initialState = initialState;
exports.metaSlice = metaSlice;
exports.setContext = setContext;
//# sourceMappingURL=meta.js.map