DictionaryFieldContextActions (Recommendation Engine)
DictionaryFieldContextActions (Recommendation Engine)
This is for:
DeveloperThe dictionary field context action creators.
See Dispatch Actions.
Loader Function
loadDictionaryFieldContextActions
Loads the context
reducer and returns possible action creators.
Parameters
-
engine:
CoreEngine
The headless engine.
Returns DictionaryFieldContextActionCreators
: The dictionary field context action creators.
DictionaryFieldContextActionCreators
addContext
Adds a new dictionary field context field-key pair.
Parameters
-
payload:
AddDictionaryFieldContextActionCreatorPayload
The action creator payload.
Returns PayloadAction<AddDictionaryFieldContextActionCreatorPayload>
: A dispatchable action.
removeContext
Removes a dictionary field context field-key pair.
Parameters
-
field:
string
The 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:
string
The name of the dictionary field.
-
key:
string
The dictionary field key to return the value of.