Skip to content

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.

@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/define once, set metadata or auth on it through a ref, and listen to its morevoice-… events with addEventListener in an effect.
  • Your own UI creates a MoreVoiceCall in an effect, subscribes to its events into state, and calls destroy() 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.