@carrybible/react-native-stream-chat-core
v3.2.0
Published
The official React Native and Expo components for Stream Chat, a service for building chat applications
Downloads
256
Keywords
Readme
Official React Native SDK for Stream Chat
The official React Native and Expo components for Stream Chat, a service for building chat applications.
Quick Links
- Stream Chat API product overview
- Register to get an API key for Stream Chat
- React Native Chat Tutorial
- Chat UI Kit
- Release Notes
- Internationalization (i18n)
- Cookbook 🚀
Contents
- React Native Compatibility
- React Native Chat Tutorial
- Example Apps
- Docs
- Keep in mind
- Setup
- TypeScript Support
- Internationalization
- Upgrade
- Common issues
- Contributing
🔐 React Native Compatibility
To use this library you need to ensure you match up with the correct version of React Native you are using.
| stream-chat-react-native
version | React Native Version | stream-chat
Version |
| ---------------------------------- | --------------------- | --------------------- |
| 3.2.0
| >= 0.60
| >= 3.5.1
|
| 3.0.0
| >= 0.60
| >= 3.0.0
|
| 2.x.x
| >= 0.60
| < 3.0.0
|
| 1.x.x
| >= 0.59
| < 3.0.0
|
| 0.x.x
| *
| < 3.0.0
|
📖 React Native Chat Tutorial
The best place to start is the React Native Chat Tutorial. It teaches you how to use this SDK and also shows how to make frequently required changes.
Free for Makers
Stream is free for most side and hobby projects. To qualify your project/company needs to have < 5 team members and < $10k in monthly revenue. For complete pricing details visit our Chat Pricing Page
🔮 Example Apps
This repo includes 4 example apps. One made with Expo, one Native JavaScript code, and two in TypeScript. One TypeScript app is a simple implementation for reference, the other is a more full featured app example.
Slack clone
Check out our tutorial on how to build a slack clone using react-native and stream-chat-react-native
Tutorial https://dev.to/vishalnarkhede/how-to-build-slack-clone-with-react-native-part-2-g5
Source code for app
📋 Docs
Please check following url for all the detailed documentation - https://github.com/GetStream/stream-chat-react-native/wiki#v300
💬 Keep in mind
Navigation between different components is something we expect consumers to implement. You can check out the example given in this repository
Minor releases may come with some breaking changes, so always check the release notes before upgrading the minor version.
You can see detailed documentation about the components at https://getstream.github.io/stream-chat-react-native
🛠 Setup (Setting up a chat app)
Please follow this doc for setup - Setup Docs
💪 TypeScript Support
As of version 2.0.0
stream-chat-react-native
has been converted to TypeScript. Please read Typescript guide for details.
✈️ Internationalization
Please read Internationalization doc for details.
🚀 Upgrading
Please refer to Upgrade Helper
⚠️ Common issues
While running native example, you may (not necessarily) run into the following issues
When you execute
yarn ios
for the first time, it starts a metro bundler in parallel. It can result in some errors since the build process isn't complete yet. Try the following to fix this:- Close/stop the metro bundler process.
- Let the build process finish. It can usually take around 2-3 minutes for the first time.
- Start the metro bundler manually by executing
yarn start
insidestream-chat-react-native/examples/NativeMessaging
directory.
When you execute
yarn android
, you may (not necessarily) run into following error:info Starting JS server... info Building and installing the app on the device (cd android && ./gradlew app:installDebug)... Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':@react-native-community_netinfo'. > SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 13s error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
To resolve this, do the following.
Create a file named
local.properties
insidestream-chat-react-native/examples/NativeMessaging/android
directoryPut the this line in that file. Make sure sdk path is correctly mentioned as per your system:
sdk.dir=/Users/{user_name}/Library/Android/sdk/
Rerun
yarn android
instream-chat-react-native/examples/NativeMessaging
directory
👏 Contributing
We welcome code changes that improve this library or fix a problem, and please make sure to follow all best practices and test all the changes. Please check our dev setup docs to get you started. We are pleased to merge your code into the official repository. Make sure to sign our Contributor License Agreement (CLA) first. See our license file for more details.