UNPKG

react-together

Version:

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

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