"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7555/react/features/base/util/hooks.ts" (28 Sep 2023, 368 Bytes) of package /linux/misc/jitsi-meet-7555.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

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