React Hookers - v6.3.0
    Preparing search index...

    Function useFunctionOnce

    • Calls a function during the initial render and caches its result until the component is unmounted.

      Type Parameters

      • A extends any[]

        The function arguments.

      • R

        The function return value.

      Parameters

      • fn: (...args: A) => R

        The function to call.

      • ...args: A

        The function arguments.

      Returns R

      The function's return value, or the cached return value.