npm.io
0.0.3 • Published 3 years ago

redux-root-state

Licence
MIT
Version
0.0.3
Deps
0
Size
5 kB
Vulns
0
Weekly
0

redux-root-state

Return the DefaultRootState interface back to the react-redux library.

How to Use

Step 1.

npm i redux-root-state

Step 2.

type RootState = ReturnType<typeof store.getState>;

declare module "redux-root-state" {
  export interface DefaultRootState extends RootState {}
}

Step 3.

import { useDispatch, useSelector, connect } from "redux-root-state";

Keywords