TwitterGitHub
Dark LogoStratik / UIbeta
useProcess

The useProcess hook provides a convenient way to manage the execution of asynchronous processes, with built-in state management to track whether a process is currently running. This is particularly useful for handling loading states in user interfaces during async and not async operations.

Return Values

NameTypeDescription
isProcessingbooleanIndicates whether the process is currently running.
executeProcess(callback: () => Promise<void>) => Promise<void>Function to execute a provided asynchronous callback, managing its processing state.