/** * Hook for managing error state and dispatching errors * * @returns Tuple of [error, dispatchError, clearError] * * @example * ```tsx * const [error, dispatchError, clearError] = useError(); * * const handleApiCall = async () => { * try { * await riskyApiCall(); * } catch (err) { * dispatchError(err); * } * }; * * return ( *