# Migration from 4.x to 5.x

This guide highlights the changes introduced from v4 to v5.

## Prop or Context Changes

The following values in [`ImageGalleryContext`](/chat/docs/sdk/react-native/v5/contexts/image-gallery-context/#value/) have been renamed:

- `image` -> `selectedMessage`
- `setImage` -> `setSelectedMessage`
- `images` -> `messages`
- `setImages` -> `setMessages`

## Remove stream-chat dependency (when applicable)

If you have installed `stream-chat` dependency explicitly on your application, then please make sure you remove it. Our Chat SDK (`stream-chat-react-native`) has `stream-chat` as a dependency (not peer dependency). Therefore, having `stream-chat` in your app's package.json is discouraged and will probably cause random issues that will disturb the chat functionalities.

```bash
yarn remove stream-chat
```

- Replace [`@react-native-community/cameraroll`](https://github.com/react-native-cameraroll/react-native-cameraroll) dependency with [`@react-native-camera-roll/camera-roll`](https://www.npmjs.com/package/@react-native-camera-roll/camera-roll):

```bash
yarn remove @react-native-community/cameraroll
yarn add @react-native-camera-roll/camera-roll
```

## Unique Chat Component Instance

Until v4, you could provide a separate `Chat` component for each usage of `Channel` component or `ChannelList` component. But from v5, you must provide only one instance of the `Chat` component within your application. This component needs to be a parent for all the chat-related components such as `ChannelList`, `Channel` or `Thread`.

## Enable Offline Support

To enable offline support please check the [Offline Support](/chat/docs/sdk/react-native/v5/basics/upgrading-from-v4/) guide.


---

This page was last updated at 2026-05-07T12:01:51.726Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/v5/basics/upgrading-from-v4/](https://getstream.io/chat/docs/sdk/react-native/v5/basics/upgrading-from-v4/).