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

remove useSyncExternalStore #15

Merged
merged 1 commit into from
May 8, 2023
Merged

remove useSyncExternalStore #15

merged 1 commit into from
May 8, 2023

Conversation

dartess
Copy link
Contributor

@dartess dartess commented May 7, 2023

According to package.json, the package requires react>=18.0.0. At the same time, a shim from use-sync-external-store package is used. However, when used together with React 18, it doesn't do anything at all; it simply uses a hook from React itself. Therefore, you can use useSyncExternalStore directly.

Now the package size is around 223 bytes (minified). A couple of kilobytes of the shim are now not included in the bundle.

I'm not sure exactly how you measure package sizes, so I didn't update the information in the README.

Closed #14

@ai ai merged commit 81aa7b8 into nanostores:main May 8, 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.

What versions of React is supported by this library?
2 participants