This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade react-redux from 9.1.0 to 9.1.1.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
- The recommended version is **1 version** ahead of your current version.
- The recommended version was released **25 days ago**, on 2024-04-14.
Release notes Package name: react-redux
This bugfix release fixes an issue with connect and React Native caused by changes to our bundling setup in v9. Nested connect calls should work correctly now.
</li>
<li>
<b>9.1.0</b> - <a href="https://snyk.io/redirect/github/reduxjs/react-redux/releases/tag/v9.1.0">2024-01-12</a></br><p>This <strong>minor release</strong> adds a new syntax for pre-typing hooks.</p>
.withTypes
Previously, the approach for "pre-typing" hooks with your app settings was a little varied. The result would look something like the below:
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import type { TypedUseSelectorHook } from "react-redux"
import { useDispatch, useSelector, useStore } from "react-redux"
import type { AppDispatch, AppStore, RootState } from "./store"
2abd620 Merge pull request #2119 from aryaemami59/add-rn-and-expo-to-ci
bf71dcf Merge branch 'add-rn-and-expo-to-ci' of https://github.com/aryaemami59/react-redux; branch 'master' of https://github.com/reduxjs/react-redux into add-rn-and-expo-to-ci
35d7ae8 Merge pull request #2125 from aryaemami59/format-things
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade react-redux from 9.1.0 to 9.1.1.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.- The recommended version is **1 version** ahead of your current version. - The recommended version was released **25 days ago**, on 2024-04-14.
Release notes
Package name: react-redux
This bugfix release fixes an issue with
connect
and React Native caused by changes to our bundling setup in v9. Nestedconnect
calls should work correctly now.What's Changed
Equals
constraint into an intersection type. by @ DanielRosenwasser in #2123useIsomorphicLayoutEffect
usage in React Native environments by @ aryaemami59 in #2156Full Changelog: v9.1.0...v9.1.1
.withTypes
Previously, the approach for "pre-typing" hooks with your app settings was a little varied. The result would look something like the below:
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import type { TypedUseSelectorHook } from "react-redux" import { useDispatch, useSelector, useStore } from "react-redux" import type { AppDispatch, AppStore, RootState } from "./store"
export const useAppDispatch: () => AppDispatch = useDispatch export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector export const useAppStore = useStore as () => AppStore">
React Redux v9.1.0 adds a new
.withTypes
method to each of these hooks, analogous to the.withTypes
method found on Redux Toolkit'screateAsyncThunk
.The setup now becomes:
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { useDispatch, useSelector, useStore } from "react-redux" import type { AppDispatch, AppStore, RootState } from "./store"
export const useAppDispatch = useDispatch.withTypes<AppDispatch>() export const useAppSelector = useSelector.withTypes<RootState>() export const useAppStore = useStore.withTypes<AppStore>()">