Skip to main content
Version: v5

Global Config

The core of Stream Chat for React Native is it's ability to be customized to your needs. The new Global Config feature allows you to enable and disable features of the library and alter the default behavior of the SDK.

tip

This will be not be the recommended way of setting the config in the next major version of the SDK that is v6.

Use the resizableCDNHosts prop in the Chat component instead.

When to use global config

When you want to alter the default behavior of the SDK or it's components. Please check the available options below to see if there is a config option that fits your needs.

How to use and alter the global config

Altering the global config can be done by calling the setConfig function on the StreamChatRN object. Make sure to call this function before any other components are rendered at the root of your application (App.tsx in most cases).

import { StreamChatRN } from 'stream-chat-react-native';

StreamChatRN.setConfig({
resizableCDNHosts: ['https://my-company-cdn.com'],
// future config options
});

Available config features/Options

resizableCDNHosts

This option allows you to specify a list of CDNs that offer image resizing.

TypeDefault
string[]['.stream-io-cdn.com']

Did you find this page helpful?