{"id":23510816,"url":"https://github.com/danielkov/use-formspree","last_synced_at":"2025-04-18T15:03:03.981Z","repository":{"id":41884612,"uuid":"334294150","full_name":"danielkov/use-formspree","owner":"danielkov","description":"React hook to simplify creating forms with FormSpree.","archived":false,"fork":false,"pushed_at":"2025-04-02T08:13:41.000Z","size":32,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T22:02:03.102Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielkov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-30T00:24:21.000Z","updated_at":"2023-08-24T20:59:59.000Z","dependencies_parsed_at":"2023-12-28T17:31:02.018Z","dependency_job_id":"83d23e9e-2127-42a1-be4c-80f6814132de","html_url":"https://github.com/danielkov/use-formspree","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.25,"last_synced_commit":"a064d5e411dc29b0efa958a0eef4e7d273067e28"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fuse-formspree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fuse-formspree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fuse-formspree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielkov%2Fuse-formspree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielkov","download_url":"https://codeload.github.com/danielkov/use-formspree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249294483,"owners_count":21245940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T12:12:26.312Z","updated_at":"2025-04-18T15:03:03.953Z","avatar_url":"https://github.com/danielkov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-formspree\n\nReact hook to simplify creating forms with [FormSpree](https://formspree.io/).\n\n## Getting Started\n\nInstall with:\n\n```sh\nyarn add use-formspree # or npm install use-formspree\n```\n\n## Usage\n\nInside your components\n\n```tsx\nimport useFormSpree from \"use-formspree\";\n\nconst url = \"https://formspree.io/f/\u003cyour form id\u003e\";\n\nconst Form = () =\u003e {\n  const [{ error, loading, response }, bind] = useFormSpree(url, {\n    // reset the form after submit\n    reset: true,\n  });\n\n  if (response) {\n    return \u003cp\u003eThank you for submitting.\u003c/p\u003e;\n  }\n\n  return (\n    \u003cform {...bind}\u003e\n      \u003clabel\u003e\n        Name: \u003cinput type=\"text\" name=\"name\" /\u003e\n      \u003c/label\u003e\n      \u003clabel\u003e\n        E-mail: \u003cinput type=\"email\" name=\"email\" /\u003e\n      \u003c/label\u003e\n      \u003cbutton type=\"submit\" disabled={error || loading}\u003e\n        Send\n      \u003c/button\u003e\n      {error \u0026\u0026 \u003cp\u003eWoops. {String(error)}\u003c/p\u003e}\n    \u003c/form\u003e\n  );\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fuse-formspree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielkov%2Fuse-formspree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielkov%2Fuse-formspree/lists"}