{"id":15290442,"url":"https://github.com/formspark/use-formspark","last_synced_at":"2025-04-13T09:32:49.982Z","repository":{"id":47859810,"uuid":"312650525","full_name":"formspark/use-formspark","owner":"formspark","description":"React hooks for Formspark","archived":false,"fork":false,"pushed_at":"2023-09-28T18:58:35.000Z","size":550,"stargazers_count":16,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T19:23:22.763Z","etag":null,"topics":["form","forms","formspark","hook","jamstack","react","react-hooks","static","static-site"],"latest_commit_sha":null,"homepage":"https://formspark.io/for/react/","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/formspark.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-11-13T18:11:06.000Z","updated_at":"2024-06-09T10:48:45.000Z","dependencies_parsed_at":"2024-06-20T22:08:32.147Z","dependency_job_id":null,"html_url":"https://github.com/formspark/use-formspark","commit_stats":{"total_commits":95,"total_committers":4,"mean_commits":23.75,"dds":0.5263157894736843,"last_synced_commit":"2e12c8bccc78e78adb3ca2d30f51fb2e8bab1908"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fuse-formspark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fuse-formspark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fuse-formspark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/formspark%2Fuse-formspark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/formspark","download_url":"https://codeload.github.com/formspark/use-formspark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223581935,"owners_count":17168655,"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":["form","forms","formspark","hook","jamstack","react","react-hooks","static","static-site"],"created_at":"2024-09-30T16:08:12.428Z","updated_at":"2024-11-07T20:04:56.079Z","avatar_url":"https://github.com/formspark.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://formspark.io\"\u003e\n        \u003cimg width=\"64\" src=\"https://cdn.formspark.io/images/formspark/logos/formspark.svg\" alt=\"Formspark logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003euse-formspark\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    React hooks for \u003ca href=\"https://formspark.io\"\u003eFormspark\u003c/a\u003e.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    Works with React and React Native.\n\u003c/p\u003e\n\n[![Continuous deployment](https://github.com/formspark/use-formspark/workflows/Continuous%20deployment/badge.svg)](https://github.com/formspark/use-formspark/actions?query=workflow%3A%22Continuous+deployment%22)\n\n## Installation\n\n```bash\n# NPM\nnpm install @formspark/use-formspark\n\n# Yarn \nyarn add @formspark/use-formspark\n```\n\n## Usage\n\n```tsx\nimport React, { useState } from \"react\";\nimport { useFormspark } from \"@formspark/use-formspark\";\n\nconst ContactForm = () =\u003e {\n  const [submit, submitting] = useFormspark({\n    formId: \"your-form-id\"\n  });\n  const [message, setMessage] = useState(\"\");\n  return (\n    \u003cform onSubmit={async (e) =\u003e {\n        e.preventDefault();\n        await submit({ message })\n    }}\u003e\n      \u003ctextarea\n        value={message}\n        onChange={(e) =\u003e setMessage(e.target.value)}\n      /\u003e\n      \u003cbutton type=\"submit\" disabled={submitting}\u003eSend\u003c/button\u003e\n    \u003c/form\u003e\n  );\n};\n```\n\n**Note:** do not mistake action url (e.g. `https://submit-form.com/capybara`) and form id (e.g. `capybara`), this package only uses the latter.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformspark%2Fuse-formspark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fformspark%2Fuse-formspark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fformspark%2Fuse-formspark/lists"}