Skip to content

v8.1.1

Compare
Choose a tag to compare
@markerikson markerikson released this 21 Jun 01:39
· 172 commits to master since this release

This bugfix release tweaks the recent lazy context setup logic to ensure a single React context instance per React version, and removes the recently added RTK peerdep to fix an issue with Yarn workspaces.

Changelog

React Context Singletons

React Context has always relied on reference identity. If you have two different copies of React or a library in a page, that can cause multiple versions of a context instance to be created, leading to problems like the infamous "Could not find react-redux context" error.

In v8.1.0, we reworked the internals to lazily create our single ReactReduxContext instance to avoid issues in a React Server Components environment.

This release further tweaks that to stash a single context instance per React version found in the page, thus hopefully avoiding the "multiple copies of the same context" error in the future.

What's Changed

Full Changelog: v8.1.0...v8.1.1