react-redux-typed-hooks
Typed hooks for react-redux. Read more about it here.
Usage:
- Define your store and store event types (store events are objects which are passed to the
dispatch
function). - Get the hooks from the factory provided by this package, and export them.
- Enjoy.
Example:
// store/index.ts
In your component files:
// view/component.tsx // import { useDispatch, useSelector } from 'react-redux' // WRONG