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

feat(server): react hooks use ref instead of memo [LIVE-8773] #210

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

Justkant
Copy link
Collaborator

@Justkant Justkant commented Aug 2, 2023

We switch to using a useRef instead of the useMemo to avoid recreating the server instance whenever the config changes.

Instead we added a setConfig to the server class to be able to update it on an existing instance.

This should help for some cases where the server would return an empty value on some endpoints.

@Justkant Justkant requested review from IAmMorrow, RamyEB, ComradeAERGO and a team August 2, 2023 07:21
@Justkant Justkant self-assigned this Aug 2, 2023
@changeset-bot
Copy link

changeset-bot bot commented Aug 2, 2023

🦋 Changeset detected

Latest commit: 187adea

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

This PR includes changesets to release 3 packages
Name Type
@ledgerhq/wallet-api-server Minor
@ledgerhq/wallet-api-simulator Patch
wallet-api-tools 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

@vercel
Copy link

vercel bot commented Aug 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
wallet-api ✅ Ready (Inspect) Visit Preview Aug 2, 2023 7:21am
wallet-api-wallet-api-tools ✅ Ready (Inspect) Visit Preview Aug 2, 2023 7:21am

@Justkant Justkant changed the title feat(server): react hooks use ref instead of memo feat(server): react hooks use ref instead of memo [LIVE-8773] Aug 2, 2023
Copy link
Contributor

@ComradeAERGO ComradeAERGO left a comment

Choose a reason for hiding this comment

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

LGTM

@Justkant Justkant merged commit e7afa6e into main Aug 3, 2023
2 checks passed
@Justkant Justkant deleted the fix/react-server-useref branch August 3, 2023 08:34
@github-actions github-actions bot mentioned this pull request Aug 3, 2023
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