uniswap-interface-uncensored/src/state/hooks.ts
Justin Domingue 61d9dfe127
chore: simplify redux types with ts inference (#1758)
* chore: simplify app dispatch and selector types with ts inference

* update SearchModal to use new types inference
2021-05-30 14:32:57 -07:00

6 lines
261 B
TypeScript

import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'
import { AppDispatch, AppState } from 'state'
export const useAppDispatch = () => useDispatch<AppDispatch>()
export const useAppSelector: TypedUseSelectorHook<AppState> = useSelector