-
Notifications
You must be signed in to change notification settings - Fork 143
Fix the wrong group channel dependency #1272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
git-babel
merged 3 commits into
feat/state-mgmt-migration-1
from
fix/groupchannel-list-issues
Dec 6, 2024
Merged
Fix the wrong group channel dependency #1272
git-babel
merged 3 commits into
feat/state-mgmt-migration-1
from
fix/groupchannel-list-issues
Dec 6, 2024
Conversation
This file contains hidden or 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
✅ Deploy Preview for sendbird-uikit-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Contributor
|
위의 변경점이 어떻게 이슈들을 해결하는지 제가 이해를 못 한 것 같습니다. 혹시 간단한 설명 부탁드릴 수 있을까요? |
git-babel
approved these changes
Dec 6, 2024
4 tasks
AhyoungRyu
added a commit
that referenced
this pull request
Dec 6, 2024
Fixes https://sendbird.atlassian.net/browse/CLNP-5981 and applied the same approach in #1272 ### 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)
AhyoungRyu
added a commit
that referenced
this pull request
Dec 11, 2024
…ider (#1272) Fixes - https://sendbird.atlassian.net/browse/CLNP-5966 - https://sendbird.atlassian.net/browse/CLNP-5967 - https://sendbird.atlassian.net/browse/CLNP-5969 - https://sendbird.atlassian.net/browse/CLNP-5971 - https://sendbird.atlassian.net/browse/CLNP-5973 ## When to use useDeepCompareEffect vs useEffect ### useDeepCompareEffect is useful when: 1. **Handling objects without guaranteed immutability** ```typescript const complexObject = { settings: { theme: { ... }, preferences: { ... } }, data: [ ... ] }; useDeepCompareEffect(() => { // When you want to detect actual value changes }, [complexObject]); ``` 2. **Working with data from external libraries or APIs** - When objects have new references but identical content 3. **Dealing with deeply nested objects where memoization is impractical** - When object structures are too complex for individual memoization ### useEffect is better when: 1. **Detecting changes in array items** ```typescript const items = [{id: 1, value: 'a'}, {id: 2, value: 'b'}]; // Better for detecting changes within array items useEffect(() => { // Detect changes in items array }, [items]); ``` 2. **Performance is critical** - Deep comparison is computationally expensive - Especially important for large arrays or frequently updating data ### Example of proper useDeepCompareEffect usage: ```typescript useDeepCompareEffect(() => { updateState({ ...configurations, ...scrollState, ...eventHandlers, }); }, [ configurations, scrollState, eventHandlers, ]); ``` This works well here because: - Dependencies are mostly objects - Updates are needed only when internal structure changes - Objects are already memoized, reducing deep comparison cost ### Key Takeaway: - Use useDeepCompareEffect when structural equality matters - Use useEffect for reference equality or primitive value changes - Consider the trade-off between performance and accuracy --------- Co-authored-by: junyoung.lim <[email protected]>
AhyoungRyu
added a commit
that referenced
this pull request
Dec 11, 2024
Fixes https://sendbird.atlassian.net/browse/CLNP-5981 and applied the same approach in #1272 ### 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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes
When to use useDeepCompareEffect vs useEffect
useDeepCompareEffect is useful when:
useEffect is better when:
Example of proper useDeepCompareEffect usage:
This works well here because:
Key Takeaway: