Code Monkey home page Code Monkey logo

bgdv-hq / stream-chat-react-native Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getstream/stream-chat-react-native

1.0 0.0 0.0 90.37 MB

Stream Chat official react-native SDK. The tutorial covers how to build your own chat experience using react-native, react-navigation and Stream

Home Page: https://getstream.io/chat/react-native-chat/tutorial/

License: Other

JavaScript 10.44% Shell 0.16% Makefile 0.08% Python 0.11% TypeScript 89.21%

stream-chat-react-native's Introduction


Important Note

Currently we are working on publishing v3.0.0. Its in beta phase (v3.0.0-beta.2) at the moment. For v2.x.x (stable), please follow the docs here


Official React Native SDK for Stream Chat

react native chat

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

NPM Build Status Component Reference

Quick Links

Contents

๐Ÿ” 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 Required React Native Version
3.x.x (beta) >= 0.60
2.x.x >= 0.60
1.x.x >= 0.59
0.x.x *

๐Ÿ“– 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.

๐Ÿ”ฎ 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.

Channels Messages Overlay

Slack clone

Check out our tutorial on how to build a slack clone using react-native and stream-chat-react-native

IMAGE ALT TEXT HERE

๐Ÿ“‹ Docs

Please check following url for all the detailed documentation - https://github.com/GetStream/stream-chat-react-native/wiki#v30-beta

๐Ÿ’ฌ Keep in mind

  1. Navigation between different components is something we expect consumers to implement. You can check out the example given in this repository

  2. 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

  1. 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:

    1. Close/stop the metro bundler process.
    2. Let the build process finish. It can usually take around 2-3 minutes for the first time.
    3. Start the metro bundler manually by executing yarn start inside stream-chat-react-native/examples/NativeMessaging directory.
  2. 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.

    1. Create a file named local.properties inside stream-chat-react-native/examples/NativeMessaging/android directory

    2. Put 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/
      
    3. Rerun yarn android in stream-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.

stream-chat-react-native's People

Contributors

vishalnarkhede avatar nhannah avatar virdesai avatar danc5 avatar jeltef avatar tbarbugli avatar mahboubii avatar tschellenbach avatar tilton avatar antoine-c avatar kgpasta avatar caricbrown avatar jeremyeaton89 avatar jj-kidd avatar radekcy avatar fbartho avatar cardoso avatar rk-glinomess avatar

Stargazers

Hani ใƒใƒญใƒซใƒ‰ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.