Interface: useDispatcherType
@ima/react-page-renderer.useDispatcherType
Properties
fire
• fire: <E>(event
: E
, data
: DispatcherEventsMap
[E
], imaInternalEvent?
: boolean
) => Dispatcher
(event
: string
, data
: any
, imaInternalEvent?
: boolean
) => Dispatcher
Type declaration
▸ <E
>(event
, data
, imaInternalEvent?
): Dispatcher
Fires a new event of the specified name, carrying the provided data.
The method will synchronously execute all event listeners registered for the specified event, passing the provided data to them as the first argument.
Note that this method does not prevent the event listeners to modify the data in any way. The order in which the event listeners will be executed is unspecified and should not be relied upon.
Type parameters
Name | Type |
---|---|
E | extends keyof DispatcherEventsMap |
Parameters
Name | Type | Description |
---|---|---|
event | E | The name of the event to fire. |
data | DispatcherEventsMap [E ] | The data to pass to the event listeners. |
imaInternalEvent? | boolean | The flag signalling whether this is an internal IMA event. The fired event is treated as a custom application event if this flag is not set. The flag is used only for debugging and has no effect on the propagation of the event. |
Returns
Dispatcher
This dispatcher.
▸ (event
, data
, imaInternalEvent?
): Dispatcher
Parameters
Name | Type |
---|---|
event | string |
data | any |
imaInternalEvent? | boolean |
Returns
Dispatcher