useAppMessage({ onAppMessage?: Function}) : Object
useAppMessage can also set up an optional callback for the app-message event.
Parameters
Callback for the
app-message event. When an app-message is sent, the callback will be called with two arguments:ev(Object): The original event payload sent fromdaily-js.sendAppMessage(Function): The function reference that was created internally insideuseAppMessage. This avoids having to call the hook twice in order to respond to anapp-messagewith anapp-message.
Return value
Wraps sendAppMessage().