UNPKG

@multisynq/react-together

Version:

A library to seamlessly add real-time multi-user interaction to your React app!

8 lines (6 loc) 293 B
import { Dispatch, SetStateAction } from 'react'; interface UseStateTogetherOptions { resetOnDisconnect?: boolean; } export default function useStateTogether<T>(rtKey: string, initialValue: T, { resetOnDisconnect }?: UseStateTogetherOptions): [T, Dispatch<SetStateAction<T>>]; export {};