ConstThe type of the result that the promise resolves to.
A function that returns a promise.
An array of dependencies that will trigger the promise to be re-evaluated when changed.
Optionalconfig: UsePromiseConfig<TResult>Optional configuration for the hook.
Configuration options for the usePromise hook.
Optionaldebug?: stringOptional debug string for logging purposes.
OptionaldefaultValue?: TResultOptional default value to be used before the promise resolves.
An array containing the result of the promise, any error that occurred, and the current state of the promise.
A custom hook that manages the state of a promise, including its result, error, and state.