You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. }