DictionaryFieldContextActions (Recommendation Engine)
DictionaryFieldContextActions (Recommendation Engine)
|
|
Note
This component was introduced in version |
The dictionary field context action creators.
See Dispatch Actions.
Loader Function
loadDictionaryFieldContextActions
Loads the context reducer and returns possible action creators.
Parameters
-
engine:
CoreEngineThe headless engine.
Returns DictionaryFieldContextActionCreators: The dictionary field context action creators.
DictionaryFieldContextActionCreators
addContext
Adds a new dictionary field context field-key pair.
Parameters
-
payload:
AddDictionaryFieldContextActionCreatorPayloadThe action creator payload.
Returns PayloadAction<AddDictionaryFieldContextActionCreatorPayload>: A dispatchable action.
removeContext
Removes a dictionary field context field-key pair.
Parameters
-
field:
stringThe field to remove from the context (for example, "price").
Returns PayloadAction<string>: A dispatchable action.
setContext
Sets the dictionary field context.
Parameters
-
payload:
Record<string, string>The action creator payload.
Returns PayloadAction<DictionaryFieldContextPayload>: A dispatchable action.
Related types
AddDictionaryFieldContextActionCreatorPayload
Properties
-
field:
stringThe name of the dictionary field.
-
key:
stringThe dictionary field key to return the value of.