Skip to content
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

Fix useClient and useAttachment performance #74

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

rygine
Copy link
Collaborator

@rygine rygine commented Aug 31, 2023

The useClient hook was causing performance issues due to its useEffect running when it should not. This PR moves the logic of that useEffect into the initialize function, where it should've lived all along.

The useAttachment hook was updated to prevent unnecessary loading of remote attachment data.

@rygine rygine requested a review from a team August 31, 2023 20:56
@changeset-bot
Copy link

changeset-bot bot commented Aug 31, 2023

🦋 Changeset detected

Latest commit: f0cc46b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@xmtp/react-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rygine rygine requested a review from jhaaaa as a code owner August 31, 2023 20:56
@rygine rygine merged commit 39238f7 into main Aug 31, 2023
@rygine rygine deleted the rygine/performance-improvements branch August 31, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants