@web3forms/react
Version:
Recieve form submissions directly to your inbox without any configuration. Powered by Web3forms. Integrates with react-hook-form and other form libs too!
15 lines (14 loc) • 448 B
TypeScript
declare const useWeb3forms: <T extends {}>({ access_key, settings, onSuccess, onError, }: {
access_key: string;
settings?: any;
onSuccess: (successMessage: string, data: Response<T>) => void;
onError: (errorMessage: string, data: Response<T>) => void;
}) => {
submit: (formData: T) => Promise<void>;
};
export default useWeb3forms;
interface Response<T> {
success: boolean;
message: string;
data: T;
}