Skip to content

Commit 6fa3789

Browse files
authored
[fix]: SDK initialization could fail or remain uninitialized in React 17 (#1372)
[fix]: SDK initialization could fail or remain uninitialized in React 17. // PR description (Optional) React 17에서 Initialize 과정에서 제대로 state 변경이 반영이 되질 않아서, 무한 Loading 상태로 보이는 문제입니다. React 18 19 에서는 발생을 하지 않습니다. // Footer (Recommended) Fixes [CLNP-7731](https://sendbird.atlassian.net/browse/CLNP-7731) // Changelogs (Recommended) // Add (internal) at the end of each changelog if internal. ### Changelogs - Fixed a Bug where SDK initialization could fail or remain uninitialized in React 17 // Co-authors // Add this if you pair programmed or they made significant contributions to the ideas in the code and you want to thank them. Co-authored-by: Name name@example.com, Name2 name@example.com ### Checklist Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If unsure, ask the members. This is a reminder of what we look for before merging your code. - [x] **All tests pass locally with my changes** - [ ] **I have added tests that prove my fix is effective or that my feature works** - [ ] **Public components / utils / props are appropriately exported** - [ ] I have added necessary documentation (if appropriate) ## External Contributions This project is not yet set up to accept pull requests from external contributors. If you have a pull request that you believe should be accepted, please contact the Developer Relations team <developer-advocates@sendbird.com> with details and we'll evaluate if we can set up a [CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement) to allow for the contribution. [CLNP-7731]: https://sendbird.atlassian.net/browse/CLNP-7731?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 901bd35 commit 6fa3789

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/lib/Sendbird/context/SendbirdProvider.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,6 @@ const SendbirdContextManager = ({
232232
configs.groupChannel.setting,
233233
configs.openChannel.channel,
234234
]);
235-
const storeState = useMemo(() => ({
236-
stores: {
237-
sdkStore: state.stores.sdkStore,
238-
userStore: state.stores.userStore,
239-
appInfoStore: state.stores.appInfoStore,
240-
},
241-
}), [
242-
state.stores.sdkStore,
243-
state.stores.userStore,
244-
state.stores.appInfoStore,
245-
]);
246235
const uikitUploadSizeLimit = useMemo(() => (uploadSizeLimit ?? DEFAULT_UPLOAD_SIZE_LIMIT), [uploadSizeLimit, DEFAULT_UPLOAD_SIZE_LIMIT]);
247236
const configImageCompression = useMemo<ImageCompressionOptions>(() => ({
248237
compressionRate: 0.7,
@@ -354,14 +343,12 @@ const SendbirdContextManager = ({
354343

355344
useDeepCompareEffect(() => {
356345
updateState({
357-
...storeState,
358346
...utilsState,
359347
...configState,
360348
eventHandlers,
361349
emojiManager,
362350
});
363351
}, [
364-
storeState,
365352
configState,
366353
eventHandlers,
367354
emojiManager,

0 commit comments

Comments
 (0)