File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 66 The 3rd parameter customData to the ` sdk.addSendbirdExtension ` function, allowing it to be delivered from outside of UIKit React.
77 e.g.
88 ```
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+ })
914 <SendbirdProvider
10- customExtensionParams={{
11- a: 'a', // the key-value set will be passed when sdk.addSendbirdExtensions is called
12- }}
15+ customExtensionParams={memoizedCustomExtensionParams.current}
1316 />
1417 ```
1518* Call ` sdk.addSendbirdExtensions ` during the connection process (#682 )
2932
3033e.g.
3134```
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+ })
3241<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}
3843/>
3944```
4045
You can’t perform that action at this time.
0 commit comments