Skip to content

Commit 194d019

Browse files
committed
Update React-Redux typedef info for 7.2.3
1 parent 471e8ea commit 194d019

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/tutorials/typescript.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ Welcome to the Redux Toolkit TypeScript Quick Start tutorial! **This tutorial wi
2727

2828
This page focuses on just how to set up the TypeScript aspects . For explanations of what Redux is, how it works, and full examples of how to use Redux Toolkit, [see the tutorials linked in the "Tutorials Overview" page](./overview.md).
2929

30+
Redux Toolkit is already written in TypeScript, so its TS type definitions are built in.
31+
32+
[React Redux](https://react-redux.js.org) has its type definitions in a separate [`@types/react-redux` typedefs package](https://npm.im/@types/react-redux) on NPM. In addition to typing the library functions, the types also export some helpers to make it easier to write typesafe interfaces between your Redux store and your React components.
33+
34+
As of React Redux v7.2.3, the `react-redux` package has a dependency on `@types/react-redux`, so the type definitions will be automatically installed with the library. Otherwise, you'll need to manually install them yourself (typically `npm install @types/react-redux` ).
35+
3036
The [Redux+TS template for Create-React-App](https://github.com/reduxjs/cra-template-redux-typescript) comes with a working example of these patterns already configured.
3137

3238
## Project Setup

0 commit comments

Comments
 (0)