You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This beta release switches the default entry point to use the useSyncExternalStore shim for compatibility with React 16.8+, and switches to a /"next" alternate entry point without the shim.
At this point, React-Redux v8 is feature-complete and stable. We still really want users to try this out and give us feedback before the final release! We'd also like to add some additional tests around SSR behavior.
We would like to release v8 as final within the next couple weeks now that React 18 is available.
Changelog
`useSyncExternalStore Shim Usage
React 18 adds the new useSyncExternalStore API. In previous betas, the plan was that React-Redux v8 would have a hard requirement on React 18. As a fallback, the betas provided a "/compat" entry point that included the uSES "shim", a userland implementation from the React team that provided compatibility with earlier React versions back to 16.8. That adds a few hundred bytes to the bundle size, so we wanted to keep the default size smaller.
After discussion with the React team, we've flipped the default behavior in v8. Now, the default entry point does rely on the uSES shim. This increases final bundle size slightly (about 600b minified compared to v7.x). However, this ensures that React-Redux v8 is compatible with React 16.8+/17 out of the box, enabling users to upgrade to v8 right away even if they aren't using React 18. It also ensures continued RN compatibility.
For users who would like to strip out the shim, this release switches to having a "/next" entry point that directly imports useSyncExternalStore from React, with no shim. You can alias "react-redux": "react-redux/next" in your bundler to use that instead.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This beta release switches the default entry point to use the
useSyncExternalStoreshim for compatibility with React 16.8+, and switches to a/"next"alternate entry point without the shim.At this point, React-Redux v8 is feature-complete and stable. We still really want users to try this out and give us feedback before the final release! We'd also like to add some additional tests around SSR behavior.
We would like to release v8 as final within the next couple weeks now that React 18 is available.
Changelog
`useSyncExternalStore Shim Usage
React 18 adds the new
useSyncExternalStoreAPI. In previous betas, the plan was that React-Redux v8 would have a hard requirement on React 18. As a fallback, the betas provided a"/compat"entry point that included theuSES"shim", a userland implementation from the React team that provided compatibility with earlier React versions back to 16.8. That adds a few hundred bytes to the bundle size, so we wanted to keep the default size smaller.However, React Native will not support React 18 until the "New Architecture" is done. So, release React-Redux v8 with a hard React 18 requirement would immediately start breaking RN usage.
After discussion with the React team, we've flipped the default behavior in v8. Now, the default entry point does rely on the
uSESshim. This increases final bundle size slightly (about 600b minified compared to v7.x). However, this ensures that React-Redux v8 is compatible with React 16.8+/17 out of the box, enabling users to upgrade to v8 right away even if they aren't using React 18. It also ensures continued RN compatibility.For users who would like to strip out the shim, this release switches to having a
"/next"entry point that directly importsuseSyncExternalStorefrom React, with no shim. You can alias"react-redux": "react-redux/next"in your bundler to use that instead.What's Changed
useSyncExternalStoreshim behavior and update React deps by @markerikson in SwapuseSyncExternalStoreshim behavior and update React deps #1884Full Changelog: v8.0.0-beta.3...v8.0.0-beta.4
This discussion was created from the release v8.0.0-beta.4.
BetaWas this translation helpful?Give feedback.
All reactions