Function useError

  • A hook that accepts an async function and returns any errors thrown.

    Type Parameters

    • AF extends AsyncFunc

    • E extends Error

    Parameters

    • injectableFn: AF

      The async function to be executed.

    Returns undefined | E

    The error thrown by the async function.

Generated using TypeDoc