React: hooks and components
@morevoice/react wraps the browser call client of @morevoice/web for React: hooks that hold a call’s state and its live transcript, and ready-made components for a talk button and an agent’s softphone.
Use the web widget in React today
Section titled “Use the web widget in React today”@morevoice/web works in any React app as it is:
- The talk button is a standard custom element: render
<morevoice-talk-button>with its attributes after loading the script or importing@morevoice/web/defineonce, setmetadataorauthon it through a ref, and listen to itsmorevoice-…events withaddEventListenerin an effect. - Your own UI creates a
MoreVoiceCallin an effect, subscribes to its events into state, and callsdestroy()in the effect’s cleanup, so leaving the page never leaves a microphone open.
Calls placed from the browser are authorised as described in who may call.