All use cases

Contact forms for React, Next.js and Jamstack apps

The Jamstack way to handle forms: keep your React or Next.js frontend, point your form at FormHook's endpoint, and skip the API route, the serverless function and the email plumbing.

The problem

The problem: forms in modern frameworks still need a backend

React, Next.js, Astro, SvelteKit — every modern framework makes the frontend easy and the backend someone else's problem. A contact form is the moment that catches up with you: you need somewhere to store the submission, and that means an API route, a serverless function, or a third-party service with its own vendor-specific SDK.

Each option adds moving parts. API routes need code, error handling and deployment config. Serverless functions need credentials for whatever you store to. And vendor SDKs couple your frontend to someone else's JavaScript library — the opposite of the framework-agnostic, composable approach that drew you to Jamstack in the first place.

A form should be as simple as a POST request. If your stack is already server-rendered (Next.js, Remix, SvelteKit), you may not even want to touch server code for something as generic as capturing a lead.

The solution

How FormHook helps

FormHook is a plain HTTP endpoint that accepts standard form posts and JSON — no SDK, no framework-specific package. Any React, Next.js or Jamstack app can use it with the fetch API or a native <form> element, so there is nothing new to learn and nothing to bundle.

It works for both worlds: server-rendered frameworks can POST server-side (your endpoint stays private), while fully static Jamstack sites (Astro, Gatsby, Vite builds) can POST straight from the browser — we answer CORS preflights with permissive headers.

Because there is no vendor script on your page, your bundle stays small, your forms keep working if our JavaScript were to change, and swapping backends later means changing a URL, not rewriting your component.

Setup

Set it up in three steps

1

Pick an endpoint key

Choose a name for your form — newsletter, contact, waitlist — and note your endpoint URL. Endpoints are created automatically on first submission, so there is nothing to provision.

2

POST to it from your component

Send a fetch request (or a native form post) to your endpoint. FormHook accepts application/x-www-form-urlencoded and application/json, so it works with plain HTML forms and React state alike.

3

Handle the JSON response

A successful submission returns {"ok":true}. Show your success message, redirect, or trigger a client-side effect — then find the submission in your dashboard, spam already filtered.