github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/webapp/javascript/redux/hooks.ts (about) 1 import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; 2 import type { RootState, AppDispatch } from './store'; 3 4 // Use throughout your app instead of plain `useDispatch` and `useSelector` 5 export const useAppDispatch = () => useDispatch<AppDispatch>(); 6 export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;