-
Notifications
You must be signed in to change notification settings - Fork 143
[CLNP-5047] Migrate GroupChannelProvider to new state management pattern #1246
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
AhyoungRyu
merged 5 commits into
feat/state-mgmt-migration-1
from
feat/CLNP-5047/groupchannel-migration
Nov 19, 2024
Merged
[CLNP-5047] Migrate GroupChannelProvider to new state management pattern #1246
AhyoungRyu
merged 5 commits into
feat/state-mgmt-migration-1
from
feat/CLNP-5047/groupchannel-migration
Nov 19, 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
9523b53 to
a3c0ccf
Compare
a3c0ccf to
e175dd2
Compare
d119173 to
88fdea1
Compare
88fdea1 to
74702f6
Compare
✅ Deploy Preview for sendbird-uikit-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
0fd6afd to
7f4737e
Compare
chrisallo
approved these changes
Nov 14, 2024
Collaborator
chrisallo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
chrisallo
reviewed
Nov 14, 2024
AhyoungRyu
added a commit
that referenced
this pull request
Dec 2, 2024
…ern (#1246) Addresses https://sendbird.atlassian.net/browse/CLNP-5047 This PR migrates the GroupChannelProvider to use a new state management pattern. This change introduces a more predictable and maintainable way to manage channel state while maintaining backward compatibility. - Introduced new store-based state management - Separated concerns between state management and event handling - Added `useGroupChannel` hook for accessing state and actions - Optimized performance with proper memoization Old pattern: ```typescript const { someState, someHandler } = useGroupChannelContext(); ``` New pattern: ```typescript // For state and actions const { state, actions } = useGroupChannel(); // For handlers and props (backward compatibility) const { someHandler } = useGroupChannelContext(); ``` - More predictable state updates - Better separation of concerns - Enhanced performance through optimized renders - All existing functionality remains unchanged - Added tests for new hooks and state management - Verified backward compatibility - Tested with real-time updates and message handling - [x] useGroupChannelContext is kept for backward compatibility - [x] Unit & integration tests will be added for new hooks and state management 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** - [x] **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)
HoonBaek
pushed a commit
that referenced
this pull request
Dec 3, 2024
…ern (#1246) Addresses https://sendbird.atlassian.net/browse/CLNP-5047 This PR migrates the GroupChannelProvider to use a new state management pattern. This change introduces a more predictable and maintainable way to manage channel state while maintaining backward compatibility. - Introduced new store-based state management - Separated concerns between state management and event handling - Added `useGroupChannel` hook for accessing state and actions - Optimized performance with proper memoization Old pattern: ```typescript const { someState, someHandler } = useGroupChannelContext(); ``` New pattern: ```typescript // For state and actions const { state, actions } = useGroupChannel(); // For handlers and props (backward compatibility) const { someHandler } = useGroupChannelContext(); ``` - More predictable state updates - Better separation of concerns - Enhanced performance through optimized renders - All existing functionality remains unchanged - Added tests for new hooks and state management - Verified backward compatibility - Tested with real-time updates and message handling - [x] useGroupChannelContext is kept for backward compatibility - [x] Unit & integration tests will be added for new hooks and state management 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** - [x] **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
…ern (#1246) Addresses https://sendbird.atlassian.net/browse/CLNP-5047 This PR migrates the GroupChannelProvider to use a new state management pattern. This change introduces a more predictable and maintainable way to manage channel state while maintaining backward compatibility. - Introduced new store-based state management - Separated concerns between state management and event handling - Added `useGroupChannel` hook for accessing state and actions - Optimized performance with proper memoization Old pattern: ```typescript const { someState, someHandler } = useGroupChannelContext(); ``` New pattern: ```typescript // For state and actions const { state, actions } = useGroupChannel(); // For handlers and props (backward compatibility) const { someHandler } = useGroupChannelContext(); ``` - More predictable state updates - Better separation of concerns - Enhanced performance through optimized renders - All existing functionality remains unchanged - Added tests for new hooks and state management - Verified backward compatibility - Tested with real-time updates and message handling - [x] useGroupChannelContext is kept for backward compatibility - [x] Unit & integration tests will be added for new hooks and state management 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** - [x] **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.
Addresses https://sendbird.atlassian.net/browse/CLNP-5047
Overview
This PR migrates the GroupChannelProvider to use a new state management pattern. This change introduces a more predictable and maintainable way to manage channel state while maintaining backward compatibility.
Key Changes
useGroupChannelhook for accessing state and actionsMigration Path
Old pattern:
New pattern:
Benefits
Testing
Notes for Reviewers
Checklist
Put an
xin 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.