File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 6
6
The 3rd parameter customData to the ` sdk.addSendbirdExtension ` function, allowing it to be delivered from outside of UIKit React.
7
7
e.g.
8
8
```
9
+ // its recommended to memoize customExtensionParams
10
+ const memoizedCustomExtensionParams = useRef({
11
+ // the key-value sets will be passed when sdk.addSendbirdExtensions is called
12
+ ...
13
+ })
9
14
<SendbirdProvider
10
- customExtensionParams={{
11
- a: 'a', // the key-value set will be passed when sdk.addSendbirdExtensions is called
12
- }}
15
+ customExtensionParams={memoizedCustomExtensionParams.current}
13
16
/>
14
17
```
15
18
* Call ` sdk.addSendbirdExtensions ` during the connection process (#682 )
29
32
30
33
e.g.
31
34
```
35
+ // its recommended to memoize sdkInitParams
36
+ const memoizedSdkInitParams = useRef({
37
+ appStateToggleEnabled: false,
38
+ debugMode: true,
39
+ // more options can be found here https://sendbird.com/docs/chat/v4/javascript/ref/interfaces/_sendbird_chat.SendbirdChatParams.html
40
+ })
32
41
<SendbirdProvider
33
- sdkInitParams={{
34
- appStateToggleEnabled: false,
35
- debugMode: true,
36
- // more options can be found here https://sendbird.com/docs/chat/v4/javascript/ref/interfaces/_sendbird_chat.SendbirdChatParams.html
37
- }}
42
+ sdkInitParams={memoizedSdkInitParams.current}
38
43
/>
39
44
```
40
45
You can’t perform that action at this time.
0 commit comments