microsoft-graph-explorer-v4
microsoft-graph-explorer-v4 copied to clipboard
Chore(deps): Bump react-redux from 7.2.8 to 8.0.2
Bumps react-redux from 7.2.8 to 8.0.2.
Release notes
Sourced from react-redux's releases.
v8.0.2
This patch release tweaks the behavior of
connect
to print a one-time warning when the obsoletepure
option is passed in, rather than throwing an error. This fixes crashes caused by libraries such asreact-beautiful-dnd
continuing to pass in that option (unnecessarily) to React-Redux v8.What's Changed
- Show warning instead of throwing error that pure option has been removed by
@ApacheEx
in reduxjs/react-redux#1922Full Changelog: https://github.com/reduxjs/react-redux/compare/v8.0.1...v8.0.2
v8.0.1
This release fixes an incorrect internal import of our
Subscription
type, which was causing TS compilation errors in some user projects. We've also listed@types/react-dom
as an optional peerDep. There are no runtime changes in this release.What's Changed
- Add optional peer dependency on
@types/react-dom
by@Methuselah96
in reduxjs/react-redux#1904- fix(ts): incorrect import of
Subscription
causesnoImplicitAny
error by@vicrep
in reduxjs/react-redux#1910Full Changelog: https://github.com/reduxjs/react-redux/compare/v8.0.0...v8.0.1
v8.0.0
This major version release updates
useSelector
,connect
, and<Provider>
for compatibility with React 18, rewrites the React-Redux codebase to TypeScript (obsoleting use of@types/react-redux
), modernizes build output, and removes the deprecatedconnectAdvanced
API and thepure
option forconnect
.npm i react-redux@latest
yarn add react-redux@latest
Overview, Compatibility, and Migration
Our public API is still the same (
<Provider>
,connect
anduseSelector/useDispatch
), but we've updated the internals to use the newuseSyncExternalStore
hook from React. React-Redux v8 is still compatible with all versions of React that have hooks (16.8+, 17.x, and 18.x; React Native 0.59+), and should just work out of the box.In most cases, it's very likely that the only change you will need to make is bumping the package version to
"react-redux": "^8.0"
.If you are using the rarely-used
connectAdvanced
API, you will need to rewrite your code to avoid that, likely by using the hooks API instead. Similarly, thepure
option forconnect
has been removed.If you are using Typescript, React-Redux is now written in TS and includes its own types. You should remove any dependencies on
@types/react-redux
.While not directly tied to React-Redux, note that the recently updated
@types/react@18
major version has changed component definitions to remove havingchildren
as a prop by default. This causes errors if you have multiple copies of@types/react
in your project. To fix this, tell your package manager to resolve@types/react
to a single version. Details:[React issue #24304: React 18 types broken since release](facebook/react#24304)
Additionally, please see the React post on How to Ugprade to React 18 for details on how to migrate existing apps to correctly use React 18 and take advantage of its new features.
Changelog
React 18 Compatibility
React-Redux now requires the new
useSyncExternalStore
API in React 18. By default, it uses the "shim" package which backfills that API in earlier React versions, so React-Redux v8 is compatible with all React versions that have hooks (16.8+, and React Native 0.59+) as its acceptable peer dependencies.
... (truncated)
Commits
d0311c1
Release 8.0.2a2853bc
Merge pull request #1922 from ApacheEx/feature/pure-option-warning6e219ee
show warning instead of throwing error that pure option has been removed8e39fa6
Merge pull request #1919 from aroyan/patch-1dc919fd
fix(docs): update broken linkf54f918
Release 8.0.17b6270d
fix(ts): incorrect import ofSubscription
causes TS error (#1910)26ddc6a
remove unused import (#1908)709c10e
Merge pull request #1905 from phapdinh/issues/130215e8747
add note for mergeProps- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
The breaking change in this work is caused by an update in the useDispatch function that's been introduced in react-redux version 8.
export function useDispatch<TDispatch = Dispatch<any>>(): TDispatch;
Changes to
export function useDispatch<A extends Action = AnyAction>(): Dispatch<A>;
Which means that in the first function we could dispatch a function that can dispatch an action. While in the second it means we can only dispatch an action object.
Our best alternative would be to use Redux Toolkit and define typed hooks (which will be correctly typed and allow thunk actions)
This would be an extensive change however there would be the benefit of using slices and removing the heavy code of action creators and reducers.
@adhiambovivian should we invest the time to update this?
A newer version of react-redux exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.
Solved by @thewahome
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version
or @dependabot ignore this minor version
. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore
condition with the desired update_types
to your config file.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.