/stream-chat-react-native

React Native Chat Components

Primary LanguageJavaScriptOtherNOASSERTION

React Native Chat Components

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

NPM Build Status Component Reference

You can sign up for a Stream account at https://getstream.io/chat/get_started/.

Keep in mind

  1. Navigation between different component is something we expect consumers to implement. You can checkout the example given in this repository
  2. This library is still under development, so breaking changes are to be expected in next couple of weeks. So we won't really recommend integrating it right now.

Library currently exposes following components:

  1. Chat
  2. Channel
  3. MessageList
  4. MessageInput
  5. ChannelList
  6. Thread
  7. ChannelPreviewMessenger

Usage (creating an example app)

Expo package

expo init StreamChatExpoExample
cd StreamChatExpoExample
yarn add stream-chat-expo

Please check Example to see usage of components.

OR you can swap this file for your App.js in root folder with additional following steps:

yarn add react-navigation

and finally

yarn start

Native package:

react-native init StreamChatReactNativeExample
cd StreamChatReactNativeExample
yarn add stream-chat-react-native
react-native link @react-native-community/netinfo

# if you are plannign to use image picker or file picker or both
react-native link react-native-image-picker
react-native link react-native-document-picker

Please check Example to see usage of components.

OR you can swap this file for your App.js in root folder with additional following steps:

yarn add react-navigation
yarn add react-native-gesture-handler
react-native link react-native-gesture-handler

and finally

react-native run-ios

NOTE If you are planning to use file picker functionality, make sure you enable iCloud capability in your app

Enable iCloud capability

How to run example

git clone https://github.com/GetStream/stream-chat-react-native.git
cd stream-chat-react-native
make
cd examples/one
yarn start

TODO:

  1. Play media in app - currently it goes to browser when clicked on attachment
  2. Add propTypes to each component
  3. Command support for inputbox