UNPKG

stream-chat-react-native-core

Version:

The official React Native and Expo components for Stream Chat, a service for building chat applications

19 lines (14 loc) 353 B
import { StateStore } from 'stream-chat'; export type SignalState = { signal: boolean; }; const INITIAL_STATE: SignalState = { signal: false, }; export class SignalStore { public state = new StateStore<SignalState>(INITIAL_STATE); signal() { this.state.partialNext({ signal: true }); this.state.partialNext({ signal: false }); } }