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

Use React's useSyncExternalStore hook to increase rendering performance #14

Merged
merged 1 commit into from
May 10, 2024

Conversation

tcaish
Copy link
Contributor

@tcaish tcaish commented May 10, 2024

Description

React has a hook called useSyncExternalStore that allows you to subscribe to external state changes in a performant and safe way, speeding up performance and reducing the number of re-renders. So we incorporated this in conjunction with the Zustand store.

React documentation

Testing

N/a

@tcaish tcaish added the enhancement New feature or request label May 10, 2024
@tcaish tcaish self-assigned this May 10, 2024
@tcaish tcaish merged commit 6d378c5 into main May 10, 2024
2 checks passed
@tcaish tcaish deleted the use-sync-external-store-hook branch May 10, 2024 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant