mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
5 lines
235 B
TypeScript
5 lines
235 B
TypeScript
import { shallowEqual, useSelector } from 'react-redux';
|
|
import { IState } from '~/redux/store';
|
|
|
|
export const useShallowSelect = <T extends (state: IState) => any>(selector: T): ReturnType<T> =>
|
|
useSelector(selector, shallowEqual);
|