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

chore: extract and test the datamodel logic from Provider #602

Merged
merged 4 commits into from
Dec 4, 2023

Conversation

travis
Copy link
Member

@travis travis commented Dec 1, 2023

One of the core goals here was to fix a bug where the client wouldn't get reset when servicePrincipal or connection changed. The easiest way to make sure this was tested was to extract all of the datamodel creation and management logic to a dedicated hook and test that.

Thanks to @gobengo for pointing out the bug and suggesting the fix: #595 (comment)

One of the core goals here was to fix a bug where the client wouldn't get reset when servicePrincipal or connection changed. The easiest way to make sure this was tested was to extract all of the datamodel creation and management logic to a dedicated hook and test that.
}
}, [client, events])

const logout = async (): Promise<void> => {
Copy link
Contributor

Choose a reason for hiding this comment

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

personally I would recommend a React.useCallback here but i don't think it is needed for any functional reason. It might make the caller's component re-render slightly less but that can always be later. (we discussed this sync and you had reaons not to which are fine)

Copy link
Contributor

@gobengo gobengo left a comment

Choose a reason for hiding this comment

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

amazing!!

@travis travis merged commit ceda4b6 into main Dec 4, 2023
2 checks passed
@travis travis deleted the chore/extract-and-test-datamodel-hook branch December 4, 2023 23:39
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