UNPKG

@yext/chat-headless

Version:

A state manager library powered by Redux for Yext Chat integrations

24 lines (21 loc) 641 B
import { createSlice } from '@reduxjs/toolkit'; const initialState = {}; /** * Registers with Redux the slice of {@link State} pertaining to * meta attributes of Chat Headless. */ const metaSlice = 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; export { metaReducer as default, initialState, metaSlice, setContext }; //# sourceMappingURL=meta.mjs.map