You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The best place to start is the [React Native Chat Tutorial](https://getstream.io/chat/react-native-chat/tutorial/). It teaches you how to use this SDK and also shows how to make common changes.
45
+
The best place to start is the [React Native Chat Tutorial](https://getstream.io/chat/react-native-chat/tutorial/). It teaches you how to use this SDK and also shows how to make frequently required changes.
42
46
43
47
## Example Apps
44
48
45
-
This repo includes 2 example apps. One that's used with Expo, and one for native.
49
+
This repo includes 2 example apps. One made with Expo, and one Native.
46
50
47
51
<divstyle="display: inline">
48
52
<imgsrc="./screenshots/1.png"alt="IMAGE ALT TEXT HERE"width="250"border="1"style="margin-right: 30px" />
@@ -62,7 +66,7 @@ This repo includes 2 example apps. One that's used with Expo, and one for native
62
66
63
67
### Native example
64
68
65
-
1. Please make sure you have installed necessary dependencies depending on your development OS and target OS. Follow the guidelines given on official react native documentation for installing dependencies: https://facebook.github.io/react-native/docs/getting-started#
69
+
1. Please make sure you have installed necessary dependencies depending on your development OS and target OS. Follow the guidelines given on official React Native documentation for installing dependencies: https://facebook.github.io/react-native/docs/getting-started#
66
70
2. Make sure node version is >= v10.13.0
67
71
3. Start the simulator
68
72
@@ -88,11 +92,11 @@ This repo includes 2 example apps. One that's used with Expo, and one for native
88
92
> Keystore file '/path_to_project/stream-chat-react-native/examples/NativeMessaging/android/app/debug.keystore' not found for signing config 'debug'.
89
93
```
90
94
91
-
You can generate the debug keystore by running this commandin the `android/app/` directory: `keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000` - [Reference](https://github.com/facebook/react-native/issues/25629#issuecomment-511209583)
95
+
You can generate the debug Keystore by running this commandin the `android/app/` directory: `keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000` - [Reference](https://github.com/facebook/react-native/issues/25629#issuecomment-511209583)
92
96
93
97
### Slack clone
94
98
95
-
Checkout our tutorial on how to build a slack clone using react-native and stream-chat-react-native
99
+
Check out our tutorial on how to build a slack clone using react-native and stream-chat-react-native
96
100
97
101
<div style="display: inline">
98
102
<img src="./screenshots/4.png" alt="IMAGE ALT TEXT HERE" width="250" border="1" style="margin-right: 30px" />
@@ -111,16 +115,15 @@ Checkout our tutorial on how to build a slack clone using react-native and strea
111
115
112
116
The [styleguidist docs for stream-chat-react-native](https://getstream.github.io/stream-chat-react-native/) document how all the components work.
113
117
114
-
The React Native components are created using the stream-chat-js library. If you're customizing the components it's important to learn how the Chat Server API works. You'll want to review our [JS chat API docs](https://getstream.io/chat/docs/js/).
118
+
The React Native components are created using the stream-chat-js library. If you're customizing the components, it's essential to learn how the Chat Server API works. You'll want to review our [JS chat API docs](https://getstream.io/chat/docs/js/).
115
119
116
120
## Keep in mind
117
121
118
-
1. Navigation between different component is something we expect consumers to
119
-
implement. You can checkout the example given in this repository
122
+
1. Navigation between different components is something we expect consumers to implement. You can check out the example given in this repository
120
123
121
-
2. Minor releases may come with some breaking changes, so always check the release notes before upgrading minor version.
124
+
2. Minor releases may come with some breaking changes, so always check the release notes before upgrading the minor version.
122
125
123
-
Library currently exposes following components:
126
+
Library currently exposes the following components:
124
127
125
128
1. Avatar
126
129
2. Chat
@@ -137,7 +140,7 @@ Library currently exposes following components:
137
140
138
141
You can see detailed documentation about the components at https://getstream.github.io/stream-chat-react-native
139
142
140
-
## Setup (Setting up an chat app)
143
+
## Setup (Setting up a chat app)
141
144
142
145
### Expo package
143
146
@@ -153,13 +156,13 @@ cd StreamChatExpoExample
153
156
# Add chat expo package
154
157
yarn add stream-chat-expo
155
158
156
-
# If you are using stream-chat-expo <= 0.4.0 and expo <= 34, then you don't need to add @react-native-community/netinfo as dependency. Since previously we used use NetInfo from react-native package.
159
+
# If you are using stream-chat-expo <= 0.4.0 and expo <= 34, then you don't need to add @react-native-community/netinfo as dependency, since previously we used NetInfo from react-native package.
Please check [Example](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/ExpoMessaging/App.js) to see usage of the components.
163
+
Please check the [example](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/ExpoMessaging/App.js) to see usage of the components.
161
164
162
-
OR you can swap [this file](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/ExpoMessaging/App.js) for your `App.js` in the root folder with additional following steps:
165
+
OR you can swap [this file](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/ExpoMessaging/App.js) for your `App.js` in the root folder with by following these additional steps:
@@ -197,9 +200,9 @@ react-native link react-native-document-picker
197
200
198
201
```
199
202
200
-
Please check [Example](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/NativeMessaging/App.js) to see usage of components.
203
+
Please check the [example](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/NativeMessaging/App.js) to see the usage of these components.
201
204
202
-
OR you can swap this file for your `App.js` in root folder with additional following steps:
205
+
OR you can swap this file for your `App.js` in the root folder by following these additional steps:
@@ -208,7 +211,7 @@ react-native link react-native-gesture-handler
208
211
react-native link react-native-reanimated
209
212
```
210
213
211
-
If you are planning to use image picker, there are some additional steps to be done. You can find them here - https://github.com/react-native-community/react-native-image-picker/blob/master/docs/Install.md
214
+
If you are planning to use the image picker, there are some additional steps to be done. You can find them here - https://github.com/react-native-community/react-native-image-picker/blob/master/docs/Install.md
212
215
213
216
If you are planning to use file/document picker, you need to enable iCloud capability in your app - https://github.com/Elyx0/react-native-document-picker#reminder
214
217
@@ -229,23 +232,23 @@ cd ios && pod install && cd ..
229
232
230
233
```
231
234
232
-
Just to be sure, please verify you are using appropriate version of following packages as per your react-native version.
235
+
Just to be sure, please verify you are using the appropriate version of the following packages as per your react-native version.
Please check [Example](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/NativeMessaging/App.js) to see usage of components.
241
+
Please check the [example](https://github.com/GetStream/stream-chat-react-native/blob/master/examples/NativeMessaging/App.js) to see the usage of components.
239
242
240
-
OR you can swap this file for your `App.js` in root folder with additional following steps:
243
+
OR you can swap this file for your `App.js` in the root folder by following these additional steps:
If you are planning to use image picker, there are some additional steps to be done. You can find them here - https://github.com/react-native-community/react-native-image-picker/blob/master/docs/Install.md
251
+
If you are planning to use an image picker, there are some additional steps to be done. You can find them here - https://github.com/react-native-community/react-native-image-picker/blob/master/docs/Install.md
249
252
250
253
If you are planning to use file/document picker, you need to enable iCloud capability in your app - https://github.com/Elyx0/react-native-document-picker#reminder
251
254
@@ -259,13 +262,13 @@ react-native run-ios
259
262
260
263
**Note for Android**:
261
264
262
-
If you are using androidx app:
265
+
If you are using AndroidX app:
263
266
264
267
> AndroidX is a major step forward in the Android ecosystem, and the old support library artifacts are being deprecated. For 0.60, React Native has been migrated over to AndroidX. This is a breaking change, and your native code and dependencies will need to be migrated as well.
In current context, dependencies such as `react-native-document-picker` and (if you are using `react-navigation`) `react-native-gesture-handler`, `react-native-reanimated` don't have androidx support. But awesome tool named [jetifier](https://github.com/mikehardy/jetifier) is quite useful to patch these dependencies with androidx support.
271
+
In current context, dependencies such as `react-native-document-picker` and (if you are using `react-navigation`) `react-native-gesture-handler`, `react-native-reanimated` don't have AndroidX support. But an awesome tool named [jetifier](https://github.com/mikehardy/jetifier) is quite useful to patch these dependencies with AndroidX support.
269
272
270
273
**NOTE** If you are planning to use file picker functionality, make sure you enable iCloud capability in your app
271
274
@@ -276,15 +279,15 @@ In current context, dependencies such as `react-native-document-picker` and (if
276
279
- Upgrade from 0.1.x to 0.2.x:
277
280
278
281
- 0.2.x added support for react native 0.60. Dependencies like `react-native-image-picker`, `react-native-document-picker` and `netinfo` have been taken out of hard dependencies and moved to peer dependencies and thus will have to be installed manually on consumer end ([Reference](https://github.com/GetStream/stream-chat-react-native/pull/52/files#diff-83a54d8caab0ea9fcdd5f832b03a5d83))
279
-
- React native 0.60 came with autolinking functionality, that means if some native libraries are linked manually before upgrade, they will have to be unlinked so that react native can autolink them ([Reference](https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked))
282
+
- React Native 0.60 came with auto-linking functionality that means if some native libraries are linked manually before the upgrade, they will have to be unlinked, so that React Native can auto-link them ([Reference](https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked))
- React native 0.60 has been migrated over to AndroidX. In current context, dependencies such as `react-native-document-picker` and (if you are using `react-navigation`) `react-native-gesture-handler`, `react-native-reanimated` don't have androidx support. But awesome tool named [jetifier](https://github.com/mikehardy/jetifier) is quite useful to patch these dependencies with androidx support.
290
+
- React Native 0.60 has been migrated over to AndroidX. In the current context, dependencies such as `react-native-document-picker` and (if you are using `react-navigation`) `react-native-gesture-handler`, `react-native-reanimated` don't have AndroidX support. But an excellent tool named [jetifier](https://github.com/mikehardy/jetifier) is quite useful to patch these dependencies with AndroidX support.
288
291
289
292
- CocoaPods are not part of React Native's iOS project ([ref](https://facebook.github.io/react-native/blog/2019/07/03/version-60#cocoapods-by-default)). Thus make sure to install all the pod dependencies.
290
293
@@ -294,11 +297,11 @@ In current context, dependencies such as `react-native-document-picker` and (if
294
297
295
298
## Common issues
296
299
297
-
#### While running native example, you may (not necessarily) run into following issues:
300
+
#### While running native example, you may (not necessarily) run into the following issues:
298
301
299
-
1. When you execute `react-native run-ios` for the first time, it starts a metro bundler in parallel. It can result into some errors, since build process isn't complete yet. Try the following to fix this:
302
+
1. When you execute `react-native run-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:
300
303
1. Close/stop the metro bundler process.
301
-
2. Let the build process finish completely, it can take usually around 2-3 minutes for the first time.
304
+
2. Let the build process finish. It can usually take around 2-3 minutes for the first time.
302
305
3. Start the metro bundler manually by executing `yarn start` inside `stream-chat-react-native/examples/NativeMessaging` directory.
303
306
2. When you execute `react-native run-android`, you may (not necessarily) run into following error:
304
307
@@ -326,7 +329,7 @@ In current context, dependencies such as `react-native-document-picker` and (if
326
329
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
327
330
```
328
331
329
-
To resolve this, do the following
332
+
To resolve this, do the following.
330
333
331
334
1. Craete a file named `local.properties` inside `stream-chat-react-native/examples/NativeMessaging/android` directory
332
335
2. Put the this line in that file. Make sure sdk path is correctly mentioned as per your system:
@@ -337,8 +340,8 @@ In current context, dependencies such as `react-native-document-picker` and (if
337
340
338
341
## Internationalisation
339
342
340
-
Instance of class `Streami18n` should be provided to Chat component to handle translations.
341
-
Stream provides following list of in-built translations for components:
343
+
Instance of class `Streami18n` should be provided to the Chat component to handle translations.
344
+
Stream provides the following list of built-in translations for components:
342
345
343
346
1. English (en)
344
347
2. Dutch (nl)
@@ -348,7 +351,7 @@ Stream provides following list of in-built translations for components:
348
351
6. Italian (it)
349
352
7. Hindi (hi)
350
353
351
-
Default language is English. Simplest way to start using chat components in one of the in-built languages would be following:
354
+
The default language is English. The simplest way to start using chat components in one of the in-built languages is the following:
352
355
353
356
Simplest way to start using chat components in one of the in-built languages would be following:
354
357
@@ -374,7 +377,7 @@ const i18n = new Streami18n({
374
377
375
378
You can find all the available keys here: https://github.com/GetStream/stream-chat-react-native/tree/master/src/i18n
376
379
377
-
They are also exported as json object from the library.
380
+
They are also exported as a JSON object from the library.
378
381
379
382
```js static
380
383
import {
@@ -393,5 +396,5 @@ Please read this docs on i18n for more details and further customizations - http
393
396
394
397
## Contributing
395
398
396
-
We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and test all the changes. Please check our [dev setup docs](https://github.com/GetStream/stream-chat-react-native/wiki/Dev-setup-for-contributing-to-the-library) to get you started. We are very happy to merge your code in the official repository. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our license file for more details.
399
+
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](https://github.com/GetStream/stream-chat-react-native/wiki/Dev-setup-for-contributing-to-the-library) to get you started. We are pleased to merge your code into the official repository. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our license file for more details.
0 commit comments