UNPKG

@multisynq/react

Version:

React bindings for Multisynq

10 lines (9 loc) 405 B
import { useMultisynqContext } from './useMultisynqContext'; /** Hook that gives access to the root Model of this Multisynq session. * Can be used to read Model properties (including other referenced Models), * and to publish events to the Model or to subscribe to Model events using the other hooks. */ export function useModelRoot() { const { model } = useMultisynqContext(); return model; }