UNPKG

@multisynq/react

Version:

React bindings for Multisynq

9 lines (8 loc) 305 B
import { useContext } from 'react'; import { MultisynqContext } from '../components/MultisynqContext'; export function useMultisynqContext() { const contextValue = useContext(MultisynqContext); if (!contextValue) throw new Error('Not inside Multisynq context'); return contextValue; }