UNPKG

stream-chat-react-native-core

Version:

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

22 lines (16 loc) 412 B
import { StateStore } from 'stream-chat'; export type MessageInputHeightState = { height: number; }; const INITIAL_STATE: MessageInputHeightState = { height: 0, }; export class MessageInputHeightStore { public store = new StateStore<MessageInputHeightState>(INITIAL_STATE); constructor() { this.store.next({ height: 0 }); } setHeight(height: number) { this.store.next({ height }); } }