You can specify types of your hook if you use Typescript
// hooks.ts
import { MasterHook } from 'master-hook'
// Here you import your hook data
import * as myHook from './my-hook'
// Fot typesctipt, pass the types of your initialState, actions and selectors into MasterHook
export const useMyHook = MasterHook(myHook) as MasterHook<typeof myHook.initialState, typeof myHook.actions, typeof myHook.selectors>
- Using Storages
- Using Actions
- Using Selectors
- Caching
- Preventing Rerendering
- Preventing Actions
- Autoset 'isPending'
- Typescript [you are here]
- Adding Reducers
- Adding Middleware and DevTools