A backend for your React Router forms
Keep full control over the look and feel of your React Router forms.
React Router is a routing library and full stack framework for React. Remix v2 continues as its framework mode.
Getting started with React Router is simple
Start collecting data in a matter of clicks.
Let Formspark take care of the servers, databases, and analytics.
Set up any form in seconds.
Out of the box React support
Compatible with Jamstack
JSX
import { useState } from "react"; import { useFormspark } from "@formspark/use-formspark"; const FORMSPARK_FORM_ID = "your-form-id"; export default function ContactPage() { const [submit, submitting] = useFormspark({ formId: FORMSPARK_FORM_ID, }); const [message, setMessage] = useState(""); const onSubmit = async (e) => { e.preventDefault(); await submit({ message }); alert("Form submitted"); }; return ( <form onSubmit={onSubmit}> <textarea value={message} onChange={(e) => setMessage(e.target.value)} /> <button type="submit" disabled={submitting}> Send </button> </form> ); }
Links
- Check out the Formspark for React Router documentation for more information.