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
Copy file name to clipboardExpand all lines: docusaurus/docs/reactnative/basics/migrating-from-5.x-to-6.x.mdx
+18-22Lines changed: 18 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,11 @@ id: upgrading-from-v5
3
3
title: Migration from 5.x to 6.x
4
4
---
5
5
6
-
:::note
7
-
If you are using new architecture or the new FlatList with [`maintainVisibleContentPosition`](https://reactnative.dev/docs/scrollview#maintainvisiblecontentposition) feat, v6.0 would require you to be in React native version **0.72** and above.
8
-
:::
9
-
10
6
## Dependency changes
11
7
12
8
The following are the crucial changes of the Stream Chat React Native SDK from version 5.x to 6.x:
13
9
14
-
####Change `react-native-fs` to `react-native-blob-util`
10
+
### Change `react-native-fs` to `react-native-blob-util`
15
11
16
12
The `react-native-fs` package has been replaced to `react-native-blob-util` in favour of the former not being actively maintained. You can replace it by running the following commands:
17
13
@@ -20,7 +16,7 @@ yarn remove react-native-fs
20
16
yarn add react-native-blob-util
21
17
```
22
18
23
-
####Change `react-native-image-resizer` to `@bam.tech/react-native-image-resizer`
19
+
### Change `react-native-image-resizer` to `@bam.tech/react-native-image-resizer`
24
20
25
21
The `react-native-image-resizer` package has been replaced with `@bam.tech/react-native-image-resizer`.
####Change `react-native-image-crop-picker` to `react-native-image-picker`
32
+
### Change `react-native-image-crop-picker` to `react-native-image-picker`
37
33
38
34
The `react-native-image-crop-picker` package has been replaced with `react-native-image-picker`. This is a better alternative, and can help us with our new architecture endeavors.
Also, the dependency is made optional now, so if you don't want to use the image picker, you can remove it from your project and the camera selector icon on the Attachment picker will be simply hidden for you.
48
44
49
-
####Change `react-native-quick-sqlite` to `op-sqlite`
45
+
### Change `react-native-quick-sqlite` to `op-sqlite`
50
46
51
47
The `react-native-quick-sqlite` package has been replaced with `op-sqlite`. This is a faster alternative, and can help us with our new architecture endeavors.
The dependency on `@stream-io/flat-list-mvcp` package has been made optional in favour of React Native's [`FlatList`](https://reactnative.dev/docs/flatlist) component supporting [`maintainVisibleContentPosition`](https://reactnative.dev/docs/scrollview#maintainvisiblecontentposition) from React Native version `>=0.72`. If the package is installed it takes up the package or the default React Native [`FlatList`](https://reactnative.dev/docs/flatlist).
The Message Menu design has been revamped to provide a better user experience. The new design is more intuitive and provides a better user experience.
78
74
@@ -82,7 +78,7 @@ The Message Menu design has been revamped to provide a better user experience. T
82
78
The previous overlay design has been replaced with a bottom sheet modal design.
83
79
:::
84
80
85
-
####Introduce new ReactionList design
81
+
### Introduce new ReactionList design
86
82
87
83
We have introduced a new ReactionList design that is more intuitive and provides a better user experience.
88
84
@@ -120,11 +116,11 @@ const App = () => {
120
116
If nothing is provided, the `resizableCDNHosts` will default to `['.stream-io-cdn.com']`.
121
117
:::
122
118
123
-
####Removed `MessageOverlayContext` and `MessageOverlayProvider`
119
+
### Removed `MessageOverlayContext` and `MessageOverlayProvider`
124
120
125
121
The `MessageOverlayContext` and `MessageOverlayProvider` have been removed.
126
122
127
-
####Removed props from `OverlayProvider`
123
+
### Removed props from `OverlayProvider`
128
124
129
125
The following props have been removed from the `OverlayProvider`:
130
126
@@ -136,7 +132,7 @@ The following props have been removed from the `OverlayProvider`:
136
132
-`messageTextNumberOfLines`
137
133
-`error`, `isMyMessage`, `isThreadMessage`, `message` and `messageReactions`
138
134
139
-
####New `Channel` props
135
+
### New `Channel` props
140
136
141
137
The props from the `OverlayProvider` have been moved to the `Channel` component. The following props have been added to the `Channel` component:
142
138
@@ -147,7 +143,7 @@ The props from the `OverlayProvider` have been moved to the `Channel` component.
147
143
-`OverlayReactionsItem` is changed to `MessageUserReactionsItem`
148
144
-`messageTextNumberOfLines`
149
145
150
-
####Removed `MessageOverlay` in favour of `MessageMenu`.
146
+
### Removed `MessageOverlay` in favour of `MessageMenu`.
151
147
152
148
The `MessageOverlay` component has been removed in favour of `MessageMenu`. The `MessageMenu` component is a more versatile and feature-rich component that can be used to show more than just reactions and actions.
153
149
@@ -165,7 +161,7 @@ The following props have been removed from the `Message` component:
165
161
166
162
The later 3 props are removed in favour of similar props on MessagesContext and is therefore not needed. The `setData` prop is removed in favour of the removal of `MessageOverlayContext` and the `setOverlay` is not needed as we don't set the message overlay in `OverlayProvider`.
167
163
168
-
####Removed props from `MessageContent` component
164
+
### Removed props from `MessageContent` component
169
165
170
166
The following props have been removed from the `MessageContent` component:
171
167
@@ -175,18 +171,18 @@ The following props have been removed from the `MessageContent` component:
175
171
176
172
The props were redundant as per the new fixes in the Reaction Design and message simple component's improvements.
177
173
178
-
####Add props to `MessageSimple` component
174
+
### Add props to `MessageSimple` component
179
175
180
176
The components from the `MessageContent` components are rendered now in `MessageSimple` component so few of the props that were removed from `MessageContent` are added to `MessageSimple` component(as mentioned above).
181
177
182
178
-`isMyMessage`, `lastGroupMessage`, `members`, `onlyEmojis`, `otherAttachments`, `showMessageStatus` imported from the Message Context.
183
179
-`MessageDeleted`, `MessageFooter`, `MessageHeader`, `MessagePinnedHeader`, `MessageReplies`, `MessageStatus`, `ReactionListBottom`, `reactionListPosition` and `ReactionListTop` imported from the Messages Context.
184
180
185
-
####Added `BottomSheetModal` component
181
+
### Added `BottomSheetModal` component
186
182
187
183
The version introduces a very basic `BottomSheetModal` component that can be used to show a modal at the bottom of the screen. This can be used to show the message actions and reactions.
188
184
189
-
####Remove `NetInfo` from the native handlers
185
+
### Remove `NetInfo` from the native handlers
190
186
191
187
The `NetInfo` package has been removed from the native handlers. This also involves not passing the `NetInfo` utility as a handler to [`registerNativeHandlers`](../customization/native-handlers.mdx#overriding-handlers) anymore.
192
188
@@ -199,15 +195,15 @@ registerNativeHandlers({
199
195
});
200
196
```
201
197
202
-
####Change the type of `quotedMessage` in `MessageInputContext`
198
+
### Change the type of `quotedMessage` in `MessageInputContext`
203
199
204
200
The type of `quotedMessage` is changed from `MessageType | boolean` to `MessageType | undefined` for better in the `MessageInputContext`.
205
201
206
-
####Refactor of theme object
202
+
### Refactor of theme object
207
203
208
204
The default theme object has been refactored to provide a better customization experience. The theme object is now more organized and provides better control over the customization. You can check the object [here](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/contexts/themeContext/utils/theme.ts).
209
205
210
-
####Remove the deprecated code
206
+
### Remove the deprecated code
211
207
212
208
- We have removed `loadChannelAtMessage` from channel context because it was no more used.
213
209
- We have removed the `handleDeleteMessage`, `handleEditMessage`, `handleQuotedReplyMessage`, `handleResendMessage`, `handleToggleBanUser` and `handleToggleMuteUser` from the message context because it was no more used. To customize the message actions follow the [customization documentation](../guides/custom-message-actions.mdx).
0 commit comments