Skip to content

Commit e725710

Browse files
authored
Merge pull request #2483 from GetStream/develop
Next Release
2 parents 00faffe + d9beea7 commit e725710

File tree

189 files changed

+6029
-5323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+6029
-5323
lines changed

docusaurus/docs/reactnative/basics/installation.mdx

+29-17
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ For Expo, you can follow [this guide](https://docs.expo.dev/get-started/installa
1919
In order to install the Stream Chat React Native SDK, run the following command in your terminal of choice:
2020

2121
<Tabs
22-
defaultValue='rncli'
23-
values={[
24-
{ label: 'RN CLI', value: 'rncli' },
25-
{ label: 'Expo', value: 'expo' },
26-
]}
22+
defaultValue='rncli'
23+
groupId='rn-platform'
24+
values={[
25+
{ label: 'RN CLI', value: 'rncli' },
26+
{ label: 'Expo', value: 'expo' },
27+
]}
2728
>
2829
<TabItem value='rncli'>
2930

@@ -35,7 +36,7 @@ yarn add stream-chat-react-native
3536
<TabItem value='expo'>
3637

3738
```bash title="Terminal"
38-
yarn add stream-chat-expo
39+
npx expo install stream-chat-expo
3940
```
4041

4142
</TabItem>
@@ -46,6 +47,7 @@ Stream Chat React Native SDK requires installing some peer dependencies to provi
4647

4748
<Tabs
4849
defaultValue='rncli'
50+
groupId='rn-platform'
4951
values={[
5052
{ label: 'RN CLI', value: 'rncli' },
5153
{ label: 'Expo', value: 'expo' },
@@ -62,7 +64,7 @@ yarn add @react-native-camera-roll/camera-roll @react-native-community/netinfo @
6264
<TabItem value='expo'>
6365

6466
```bash title="Terminal"
65-
expo install @stream-io/flat-list-mvcp @react-native-community/netinfo expo-file-system expo-image-manipulator expo-image-picker expo-media-library react-native-gesture-handler react-native-reanimated react-native-svg
67+
npx expo install @stream-io/flat-list-mvcp @react-native-community/netinfo expo-file-system expo-image-manipulator expo-image-picker expo-media-library react-native-gesture-handler react-native-reanimated react-native-svg
6668
```
6769

6870
</TabItem>
@@ -72,6 +74,7 @@ So what did we install precisely?
7274

7375
<Tabs
7476
defaultValue='rncli'
77+
groupId='rn-platform'
7578
values={[
7679
{ label: 'RN CLI', value: 'rncli' },
7780
{ label: 'Expo', value: 'expo' },
@@ -111,6 +114,7 @@ There are a few optional dependencies that can be added to have more features wi
111114

112115
<Tabs
113116
defaultValue='rncli'
117+
groupId='rn-platform'
114118
values={[
115119
{ label: 'RN CLI', value: 'rncli' },
116120
{ label: 'Expo', value: 'expo' },
@@ -148,28 +152,35 @@ The most important steps to get started are:
148152

149153
```js
150154
module.exports = {
151-
...
155+
presets: [
156+
... // don't add it here :)
157+
],
152158
plugins: [
153159
...
154160
// highlight-next-line
155-
'react-native-reanimated/plugin', // Reanimated plugin has to be listed last.
161+
'react-native-reanimated/plugin',
156162
],
157163
};
158164
```
159165

160-
- Import `react-native-gesture-handler` at the top of your `index.js` file. It should look as follows:
166+
:::caution
167+
`react-native-reanimated/plugin` has to be listed last.
168+
:::
161169

162-
```js
163-
// highlight-next-line
164-
import 'react-native-gesture-handler';
165-
import { AppRegistry } from 'react-native';
170+
- After installation, wrap your entry point with `<GestureHandlerRootView>` or `gestureHandlerRootHOC`:
166171

167-
import App from './App';
168-
import { name as appName } from './app.json';
172+
```js
173+
import { GestureHandlerRootView } from 'react-native-gesture-handler';
169174

170-
AppRegistry.registerComponent(appName, () => App);
175+
export default function App() {
176+
return <GestureHandlerRootView style={{ flex: 1 }}>{/* content */}</GestureHandlerRootView>;
177+
}
171178
```
172179

180+
:::note
181+
The entry point of your app exists usually either in `index.js` or `App.tsx` file. In case of navigation with Expo Router v3.x, the entry point is inside `app/_layout.js`.
182+
:::
183+
173184
Please also follow the steps mentioned in the links below for corresponding dependencies:
174185

175186
- `react-native` - [additional installation steps](https://reactnative.dev/docs/image#gif-and-webp-support-on-android)
@@ -180,6 +191,7 @@ Now you should be able to run the app on simulator by running following command:
180191

181192
<Tabs
182193
defaultValue='rncli'
194+
groupId='rn-platform'
183195
values={[
184196
{ label: 'RN CLI', value: 'rncli' },
185197
{ label: 'Expo', value: 'expo' },

docusaurus/docs/reactnative/basics/overview.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ The SDK tries to keep the list of external dependencies to a minimum, these are
5252

5353
<Tabs
5454
defaultValue='rncli'
55+
groupId='rn-platform'
5556
values={[
5657
{ label: 'RN CLI', value: 'rncli' },
5758
{ label: 'Expo', value: 'expo' },
@@ -93,6 +94,7 @@ There are a few optional dependencies that can be added by our users to have mor
9394

9495
<Tabs
9596
defaultValue='rncli'
97+
groupId='rn-platform'
9698
values={[
9799
{ label: 'RN CLI', value: 'rncli' },
98100
{ label: 'Expo', value: 'expo' },

docusaurus/docs/reactnative/customization/typescript.mdx

-14
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,3 @@ Hooks, including those to access contexts, also require generics to be applied t
147147
```tsx
148148
const { channel } = useChannelContext<StreamChatGenerics>();
149149
```
150-
151-
## Partial inference
152-
153-
Inference only works correctly when all generics are provided by a given input.
154-
[Partial Type Argument Inference](https://github.com/microsoft/TypeScript/issues/26242) is currently not supported in TypeScript.
155-
156-
### Higher Order Components
157-
158-
The lack of partial inference is particularly relevant if Higher Order Components (HOC) are used in place of the provided context hooks.
159-
The `withChannelContext` HOC accepts the generics similarly to the `useChannelContext` hook, but because partial inference is not supported the props for the wrapped component must also be explicitly provided.
160-
161-
```tsx {2}
162-
withChannelContext<MyComponentProps, StreamChatGenerics>(MyComponent);
163-
```

docusaurus/shared

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/santhoshvaiyapuri/.nvm/versions/node/v18.14.0/bin/../lib/node_modules/stream-chat-docusaurus-cli/shared
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
1-
import React, { useContext } from "react";
2-
import { SafeAreaView, View } from "react-native";
3-
import { Channel, Thread } from "stream-chat-expo";
4-
import { Stack } from "expo-router";
5-
import { AppContext } from "../../../../../context/AppContext";
1+
import React, { useContext } from 'react';
2+
import { SafeAreaView, View } from 'react-native';
3+
import { Channel, Thread } from 'stream-chat-expo';
4+
import { Stack } from 'expo-router';
5+
import { AppContext } from '../../../../../context/AppContext';
66

77
export default function ThreadScreen() {
8-
const { channel, thread, setThread } = useContext(AppContext);
9-
return (
10-
<SafeAreaView>
11-
<Stack.Screen options={{ title: "Thread Screen" }} />
8+
const { channel, thread, setThread } = useContext(AppContext);
129

13-
<Channel channel={channel} thread={thread} threadList>
14-
<View
15-
style={{
16-
flex: 1,
17-
justifyContent: "flex-start",
18-
}}
19-
>
20-
<Thread
21-
onThreadDismount={() => {
22-
setThread(undefined);
23-
}}
24-
/>
25-
</View>
26-
</Channel>
27-
</SafeAreaView>
28-
);
10+
if (channel === undefined) {
11+
return null;
12+
}
13+
14+
return (
15+
<SafeAreaView>
16+
<Stack.Screen options={{ title: 'Thread Screen' }} />
17+
18+
<Channel channel={channel} thread={thread} threadList>
19+
<View
20+
style={{
21+
flex: 1,
22+
justifyContent: 'flex-start',
23+
}}
24+
>
25+
<Thread
26+
onThreadDismount={() => {
27+
setThread(undefined);
28+
}}
29+
/>
30+
</View>
31+
</Channel>
32+
</SafeAreaView>
33+
);
2934
}

examples/ExpoMessaging/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@react-native-community/netinfo": "11.1.0",
14-
"expo": "~50.0.13",
14+
"expo": "~50.0.14",
1515
"expo-av": "~13.10.5",
1616
"expo-clipboard": "~5.0.1",
1717
"expo-constants": "~15.4.5",
@@ -38,7 +38,7 @@
3838
"react-native-web": "~0.19.6",
3939
"stream-chat-expo": "link:../../package/expo-package",
4040
"stream-chat-react-native-core": "link:../../package",
41-
"typescript": "^5.1.3"
41+
"typescript": "5.0.4"
4242
},
4343
"devDependencies": {
4444
"@babel/core": "^7.20.0",

examples/ExpoMessaging/yarn.lock

+17-17
Original file line numberDiff line numberDiff line change
@@ -4153,10 +4153,10 @@ expo-modules-autolinking@1.10.3:
41534153
find-up "^5.0.0"
41544154
fs-extra "^9.1.0"
41554155

4156-
expo-modules-core@1.11.12:
4157-
version "1.11.12"
4158-
resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-1.11.12.tgz#d5c7b3ed7ab57d4fb6885a0d8e10287dcf1ffe5f"
4159-
integrity sha512-/e8g4kis0pFLer7C0PLyx98AfmztIM6gU9jLkYnB1pU9JAfQf904XEi3bmszO7uoteBQwSL6FLp1m3TePKhDaA==
4156+
expo-modules-core@1.11.13:
4157+
version "1.11.13"
4158+
resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-1.11.13.tgz#a8e63ad844e966dce78dea40b50839af6c3bc518"
4159+
integrity sha512-2H5qrGUvmLzmJNPDOnovH1Pfk5H/S/V0BifBmOQyDc9aUh9LaDwkqnChZGIXv8ZHDW8JRlUW0QqyWxTggkbw1A==
41604160
dependencies:
41614161
invariant "^2.2.4"
41624162

@@ -4192,10 +4192,10 @@ expo-status-bar@~1.11.1:
41924192
resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-1.11.1.tgz#a11318741d361048c11db2b16c4364a79a74af30"
41934193
integrity sha512-ddQEtCOgYHTLlFUe/yH67dDBIoct5VIULthyT3LRJbEwdpzAgueKsX2FYK02ldh440V87PWKCamh7R9evk1rrg==
41944194

4195-
expo@~50.0.13:
4196-
version "50.0.14"
4197-
resolved "https://registry.yarnpkg.com/expo/-/expo-50.0.14.tgz#ddcae86aa0ba8d1be3da9ad1bdda23fa539dc97d"
4198-
integrity sha512-yLPdxCMVAbmeEIpzzyAuJ79wvr6ToDDtQmuLDMAgWtjqP8x3CGddXxUe07PpKEQgzwJabdHvCLP5Bv94wMFIjQ==
4195+
expo@~50.0.14:
4196+
version "50.0.15"
4197+
resolved "https://registry.yarnpkg.com/expo/-/expo-50.0.15.tgz#18c5c3ee0125fd42fe828b6791410eed68f7e74a"
4198+
integrity sha512-tsyRmMHjA8lPlM7AsqH1smSH8hzmn1+x/vsP+xgbKYJTGtYccdY/wsm6P84VJWeK5peWSVqrWNos+YuPqXKLSQ==
41994199
dependencies:
42004200
"@babel/runtime" "^7.20.0"
42014201
"@expo/cli" "0.17.8"
@@ -4209,7 +4209,7 @@ expo@~50.0.13:
42094209
expo-font "~11.10.3"
42104210
expo-keep-awake "~12.8.2"
42114211
expo-modules-autolinking "1.10.3"
4212-
expo-modules-core "1.11.12"
4212+
expo-modules-core "1.11.13"
42134213
fbemitter "^3.0.0"
42144214
whatwg-url-without-unicode "8.0.0-3"
42154215

@@ -7439,10 +7439,10 @@ stream-buffers@2.2.x:
74397439
version "0.0.0"
74407440
uid ""
74417441

7442-
stream-chat-react-native-core@5.26.0:
7443-
version "5.26.0"
7444-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.26.0.tgz#b081bde25585a9f571ac7bb2dc8c910e4ddc99c5"
7445-
integrity sha512-Sh5MufLMn6JlEDiML+xDwa5EaCkegHMhKTXdBxfbtbbxaBl1WDOhpwgR6ROIyvGt8nuJ4NQOzRseiNCyXpibXA==
7442+
stream-chat-react-native-core@5.27.0:
7443+
version "5.27.0"
7444+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.27.0.tgz#1cead940ca3a26555a97039e2e893e9698cff7b1"
7445+
integrity sha512-vIfq2pGMwDwYjnxgBfAOfVLo3nvVc+GBCFgJHtsEPm9o3HXZQNoxrTg5adFgKPQ7A6cC2MEs1uluWkmdRdFhpQ==
74467446
dependencies:
74477447
"@babel/runtime" "^7.12.5"
74487448
"@gorhom/bottom-sheet" "4.4.8"
@@ -7810,10 +7810,10 @@ type-fest@^0.7.1:
78107810
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48"
78117811
integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==
78127812

7813-
typescript@^5.1.3:
7814-
version "5.4.3"
7815-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff"
7816-
integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==
7813+
typescript@5.0.4:
7814+
version "5.0.4"
7815+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b"
7816+
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
78177817

78187818
ua-parser-js@^0.7.30:
78197819
version "0.7.35"

examples/SampleApp/package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,17 @@
5858
"@babel/core": "^7.20.0",
5959
"@babel/preset-env": "^7.20.0",
6060
"@babel/runtime": "^7.20.0",
61-
"@types/react-native-video": "^5.0.18",
62-
"@types/react-test-renderer": "18.0.0",
63-
"babel-jest": "29.6.3",
64-
"eslint": "^8.19.0",
65-
"jest": "^29.7.0",
6661
"@react-native/babel-preset": "0.73.21",
6762
"@react-native/eslint-config": "0.73.2",
6863
"@react-native/metro-config": "0.73.5",
6964
"@react-native/typescript-config": "0.73.1",
7065
"@rnx-kit/metro-config": "^1.3.14",
66+
"@types/react": "^18.2.75",
67+
"@types/react-native-video": "^5.0.18",
68+
"@types/react-test-renderer": "18.0.0",
69+
"babel-jest": "29.6.3",
70+
"eslint": "^8.19.0",
71+
"jest": "^29.7.0",
7172
"prettier": "^2.8.8",
7273
"react-test-renderer": "18.2.0",
7374
"typescript": "5.0.4"

examples/SampleApp/yarn.lock

+13-20
Original file line numberDiff line numberDiff line change
@@ -2178,6 +2178,14 @@
21782178
"@types/scheduler" "*"
21792179
csstype "^3.0.2"
21802180

2181+
"@types/react@^18.2.75":
2182+
version "18.2.75"
2183+
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.75.tgz#45d18f384939306d35312def1bf532eb38a68562"
2184+
integrity sha512-+DNnF7yc5y0bHkBTiLKqXFe+L4B3nvOphiMY3tuA5X10esmjqk7smyBZzbGTy2vsiy/Bnzj8yFIBL8xhRacoOg==
2185+
dependencies:
2186+
"@types/prop-types" "*"
2187+
csstype "^3.0.2"
2188+
21812189
"@types/scheduler@*":
21822190
version "0.16.8"
21832191
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff"
@@ -6897,10 +6905,10 @@ statuses@~1.5.0:
68976905
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
68986906
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
68996907

6900-
stream-chat-react-native-core@5.24.0:
6901-
version "5.24.0"
6902-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.24.0.tgz#425a06d2ad70efa322b8b4a6293de820fee9bb7d"
6903-
integrity sha512-HAGMjx69vfPLW8qOVKlcmQGTHDE3NBNi5H2mrf72J/mkSPtmFjMfC3/ZWY9RPwjdUyBMkUCv85ZN0n92sNHn6w==
6908+
stream-chat-react-native-core@5.27.0:
6909+
version "5.27.0"
6910+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-5.27.0.tgz#1cead940ca3a26555a97039e2e893e9698cff7b1"
6911+
integrity sha512-vIfq2pGMwDwYjnxgBfAOfVLo3nvVc+GBCFgJHtsEPm9o3HXZQNoxrTg5adFgKPQ7A6cC2MEs1uluWkmdRdFhpQ==
69046912
dependencies:
69056913
"@babel/runtime" "^7.12.5"
69066914
"@gorhom/bottom-sheet" "4.4.8"
@@ -6915,7 +6923,7 @@ stream-chat-react-native-core@5.24.0:
69156923
path "0.12.7"
69166924
react-native-markdown-package "1.8.2"
69176925
react-native-url-polyfill "^1.3.0"
6918-
stream-chat "8.15.0"
6926+
stream-chat "8.17.0"
69196927

69206928
"stream-chat-react-native-core@link:../../package":
69216929
version "0.0.0"
@@ -6925,21 +6933,6 @@ stream-chat-react-native-core@5.24.0:
69256933
version "0.0.0"
69266934
uid ""
69276935

6928-
stream-chat@8.15.0:
6929-
version "8.15.0"
6930-
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.15.0.tgz#37d84768b24e32fcea85b29165e05cb2d5cae517"
6931-
integrity sha512-6qrV0pL5dBkqPslpoSkBLjrgiMtFaOvUChue7j3VafhogXGLpu4j6ACPWq3Lrj9XJGfJkOwfT7LyqEhwfmajgQ==
6932-
dependencies:
6933-
"@babel/runtime" "^7.16.3"
6934-
"@types/jsonwebtoken" "~9.0.0"
6935-
"@types/ws" "^7.4.0"
6936-
axios "^1.6.0"
6937-
base64-js "^1.5.1"
6938-
form-data "^4.0.0"
6939-
isomorphic-ws "^4.0.1"
6940-
jsonwebtoken "~9.0.0"
6941-
ws "^7.4.4"
6942-
69436936
stream-chat@8.17.0:
69446937
version "8.17.0"
69456938
resolved "https://registry.yarnpkg.com/stream-chat/-/stream-chat-8.17.0.tgz#01c4aacbcdb5dd734b088e70f40cd42a0bcd0fb7"

examples/TypeScriptMessaging/ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1507,4 +1507,4 @@ SPEC CHECKSUMS:
15071507

15081508
PODFILE CHECKSUM: 90406e1e85c82b37484f5d746afa45c0637bb4b3
15091509

1510-
COCOAPODS: 1.15.2
1510+
COCOAPODS: 1.14.3

0 commit comments

Comments
 (0)