Skip to content

Conversation

@AhyoungRyu
Copy link
Contributor

Addresses https://sendbird.atlassian.net/browse/CLNP-6022?focusedCommentId=301263

Key changes

Memoized action handlers(+ scroll related functions as well) in useGroupChannel to reduced unnecessary re-rendering.

@netlify
Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for sendbird-uikit-react ready!

Name Link
🔨 Latest commit c1f6bab
🔍 Latest deploy log https://app.netlify.com/sites/sendbird-uikit-react/deploys/675f84e186c97b000867948e
😎 Deploy Preview https://deploy-preview-1288--sendbird-uikit-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wrapped all handlers with useCallback one by one. No logic changes.

*/
return false;
}
return !isEqual(prevState[key as keyof T], value);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the way of comparing prev <-> next state with isEqual for deeper comparison like useDeepCompareEffect

@HoonBaek
Copy link
Contributor

I think it's good to merge now!

@AhyoungRyu AhyoungRyu merged commit 2c0387f into feat/state-mgmt-migration-1 Dec 16, 2024
10 checks passed
@AhyoungRyu AhyoungRyu deleted the fix/CLNP-6022-2 branch December 16, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants