UNPKG

stream-chat-react-native-core

Version:

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

14 lines (10 loc) 524 B
import { useStateStore } from './useStateStore'; import { useAttachmentPickerContext } from '../contexts/attachmentPickerContext/AttachmentPickerContext'; import { AttachmentPickerState } from '../state-store/attachment-picker-store'; const selector = (nextState: AttachmentPickerState) => ({ selectedPicker: nextState.selectedPicker, }); export const useAttachmentPickerState = () => { const { attachmentPickerStore } = useAttachmentPickerContext(); return useStateStore(attachmentPickerStore.state, selector); };