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

Refactor hydrated checks with uSES #205

Open
OhKai opened this issue Jan 2, 2024 · 0 comments
Open

Refactor hydrated checks with uSES #205

OhKai opened this issue Jan 2, 2024 · 0 comments

Comments

@OhKai
Copy link
Contributor

OhKai commented Jan 2, 2024

We currently use the useEffect() method of determining if we have hydrated or not to avoid server-client mismatches during initial render due to client-only data (e.g. LocalStorage).

With useSyncExternalStore we can avoid the performance hit of having an extra render for the actual data (see this).

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

No branches or pull requests

1 participant