您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

hooks.ts 368B

123456789101112
  1. import { useSelector } from 'react-redux';
  2. /**
  3. * Takes a redux selector and binds it to specific values.
  4. *
  5. * @param {Function} selector - The selector function.
  6. * @param {...any} args - The values to bind to.
  7. * @returns {any}
  8. */
  9. export function useBoundSelector(selector: Function, ...args: any[]) {
  10. return useSelector(state => selector(state, ...args));
  11. }