You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/shared/redux/hooks/useAppSelector.ts

12 lines
343 B
TypeScript

import type { AppState } from 'tailchat-shared/redux/slices';
import { useSelector, useDispatch } from 'react-redux';
export function useAppSelector<T>(
selector: (state: AppState) => T,
equalityFn?: (left: T, right: T) => boolean
) {
return useSelector<AppState, T>(selector, equalityFn);
}
export const useAppDispatch = useDispatch;