-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2085 from GetStream/develop
Next release
- Loading branch information
Showing
157 changed files
with
5,659 additions
and
10,030 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
docusaurus/docs/reactnative/customization/global_config.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
id: global_config | ||
sidebar_position: 6 | ||
title: 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. | ||
|
||
We will be gradually adding more features/options to the global config. | ||
In the future this will be the main way to alter the default behavior of the SDK and it's components. | ||
|
||
## When to use a Global Configt | ||
|
||
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). | ||
|
||
```tsx | ||
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. | ||
|
||
| Type | Default | | ||
| ---------- | ------------------------ | | ||
| `string[]` | `['.stream-io-cdn.com']` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.