mirror of https://github.com/msgbyte/tailchat
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.
16 lines
410 B
TypeScript
16 lines
410 B
TypeScript
import type { AppState } from '../slices';
|
|
import { useSelector, useDispatch, useStore } 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;
|
|
|
|
export function useAppStore<AppState>() {
|
|
return useStore<AppState>();
|
|
}
|