{"id":13881019,"url":"https://github.com/andyrichardson/fielder","last_synced_at":"2025-04-06T07:10:34.042Z","repository":{"id":36433935,"uuid":"203000470","full_name":"andyrichardson/fielder","owner":"andyrichardson","description":"A field-first form library for React and React Native","archived":false,"fork":false,"pushed_at":"2022-09-19T14:24:26.000Z","size":19322,"stargazers_count":194,"open_issues_count":7,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T06:06:16.827Z","etag":null,"topics":["form","forms","hooks","react","schema","state","yup"],"latest_commit_sha":null,"homepage":"https://fielder.andyrichardson.dev","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/andyrichardson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-18T12:30:28.000Z","updated_at":"2024-11-17T22:01:59.000Z","dependencies_parsed_at":"2022-09-01T22:31:39.311Z","dependency_job_id":null,"html_url":"https://github.com/andyrichardson/fielder","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrichardson%2Ffielder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrichardson%2Ffielder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrichardson%2Ffielder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyrichardson%2Ffielder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyrichardson","download_url":"https://codeload.github.com/andyrichardson/fielder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445669,"owners_count":20939958,"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","hooks","react","schema","state","yup"],"created_at":"2024-08-06T08:03:47.699Z","updated_at":"2025-04-06T07:10:34.004Z","avatar_url":"https://github.com/andyrichardson.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Fielder logo\" src=\"https://github.com/andyrichardson/fielder/blob/master/docs/src/assets/readme-logo.svg?raw=true\" width=\"150px\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eFielder\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\u003ci\u003eA field-first form library for React and React Native.\u003c/i\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/andyrichardson/fielder/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/checks-status/andyrichardson/fielder/master.svg\" alt=\"build\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmjs.com/package/fielder\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/fielder\" alt=\"version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=fielder\"\u003e\n    \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/fielder.svg\" alt=\"size\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/andyrichardson/fielder\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/andyrichardson/fielder.svg\" alt=\"coverage\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://fielder.andyrichardson.dev\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-visit-orange\" alt=\"docs\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# About\n\n_Fielder_ is a form library for React and React Native that has been built from the ground up with a [field-first approach to validation](https://dev.to/andyrichardsonn/why-we-need-another-form-library-fielder-4eah).\n\n## Features\n\n⚡️ **Synchronous validation** - _no cascading renders_\n\n🛎 **Validation events** - _validation can differ per event (change, blur, submit, etc.)_\n\n🪝 **Hooks that work** - _hooks respond to validation changes_\n\n🧠 **Evolving schemas** - _validation logic evolves with the UI_\n\n## Basic usage\n\n### Install Fielder\n\nAdd Fielder to your project.\n\n```sh\nnpm i fielder\n```\n\n### Import the module\n\nUse `fielder` or `fielder/preact`.\n\n```tsx\n// React\nimport { useForm, ... } from 'fielder';\n\n// Preact\nimport { useForm, ... } from 'fielder/preact';\n```\n\n### Set up a form\n\nUse the `useForm` hook to create a form.\n\n```tsx\nconst myForm = useForm();\n\nreturn \u003cFielderProvider value={myForm}\u003e{children}\u003c/FielderProvider\u003e;\n```\n\n### Create some fields\n\nUse the `useField` hook to create a field.\n\n```tsx\nconst [usernameProps, usernameMeta] = useField({\n  name: 'username',\n  initialValue: '',\n  validate: useCallback(({ value }) =\u003e {\n    if (!value) {\n      throw Error('Username is required!');\n    }\n  }, []),\n});\n\nreturn (\n  \u003c\u003e\n    \u003cinput type=\"text\" {...usernameProps} /\u003e\n    \u003cspan\u003e{usernameMeta.error}\u003c/span\u003e\n  \u003c/\u003e\n);\n```\n\n### Additional info\n\nOnce you're all set up, be sure to check out [the guides](http://fielder.andyrichardson.dev/guides/getting-started) for a deeper dive!\n\n## Additional resources\n\nFor more info, tutorials and examples, visit the **[official docs site](https://fielder.andyrichardson.dev/)**!\n\nAlso check out:\n\n- [[Article] Why we need another form library](https://dev.to/andyrichardsonn/why-we-need-another-form-library-fielder-4eah)\n- [[Benchmark] Fielder vs Formik](https://github.com/andyrichardson/fielder-benchmark)\n- [[Video] Getting started with Fielder](https://www.youtube.com/watch?v=wSorSlCkJwk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyrichardson%2Ffielder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyrichardson%2Ffielder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyrichardson%2Ffielder/lists"}