UNPKG

react-native-gifted-chat-flashlist

Version:

React Native Gifted Chat with FlashList optimization for better performance

24 lines (20 loc) 584 B
import * as React from 'react' import { ActionSheetOptions, } from '@expo/react-native-action-sheet' export interface IGiftedChatContext { actionSheet(): { showActionSheetWithOptions: ( options: ActionSheetOptions, callback: (buttonIndex?: number) => void | Promise<void> ) => void } getLocale(): string } export const GiftedChatContext = React.createContext<IGiftedChatContext>({ getLocale: () => 'en', actionSheet: () => ({ showActionSheetWithOptions: () => {}, }), }) export const useChatContext = () => React.useContext(GiftedChatContext)