-
-
Notifications
You must be signed in to change notification settings - Fork 142
[core] Fix useSyncExternalStoreWithSelector in React 17 #2090
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
[core] Fix useSyncExternalStoreWithSelector in React 17 #2090
Conversation
commit: |
Bundle size reportTotal Size Change: 🔺+1.55KB(+0.11%) - Total Gzip Change: 🔺+424B(+0.09%) Show details for 41 more bundles@base-ui-components/react parsed: 🔺+777B(+0.25%) gzip: 🔺+214B(+0.23%) |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Fix
useSyncExternalStore
import error in React 17.use-sync-external-store/with-selector
does not import the shim, so it broke in React 17 which does not supportuseSyncExternalStore
. The fix is to importuse-sync-external-store/shim/with-selector
.This
use-sync-external-store/with-selector
import was added in this commit, so it isn't in any release yet.Error reproduction
Fix confirmation
More info: mui/mui-x#18303 (comment)