{"id":16644537,"url":"https://github.com/danielpza/simple-form-state-example","last_synced_at":"2026-04-28T04:35:56.414Z","repository":{"id":102065026,"uuid":"429904659","full_name":"danielpza/simple-form-state-example","owner":"danielpza","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-19T19:32:37.000Z","size":373,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-08T22:34:11.740Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielpza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-19T18:57:53.000Z","updated_at":"2021-11-25T03:58:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"f937d31f-7cfd-4a05-8a9b-6778576a3c23","html_url":"https://github.com/danielpza/simple-form-state-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielpza/simple-form-state-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpza%2Fsimple-form-state-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpza%2Fsimple-form-state-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpza%2Fsimple-form-state-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpza%2Fsimple-form-state-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielpza","download_url":"https://codeload.github.com/danielpza/simple-form-state-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpza%2Fsimple-form-state-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32367021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-12T08:11:38.423Z","updated_at":"2026-04-28T04:35:56.406Z","avatar_url":"https://github.com/danielpza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Form helper example (similar to formik)\n\nHow to use:\n\n```tsx\n// App.tsx\nimport React from \"react\";\nimport { createStateHandler } from \"./state-handler\";\n\nconst [StateContext, useState, withState] = createStateHandler\u003c{\n  firstName: string;\n  lastName: string;\n  range: {\n    start: number;\n    end: number;\n  };\n}\u003e();\n\nconst TextField = withState(\"input\");\n\nfunction Form() {\n  return (\n    \u003c\u003e\n      \u003cTextField statePath=\"firstName\" /\u003e\n      \u003cTextField statePath=\"lastName\" /\u003e\n      \u003cTextField statePath=\"range.start\" /\u003e\n      \u003cTextField statePath=\"range.end\" /\u003e\n    \u003c/\u003e\n  );\n}\n\nfunction App() {\n  const [state, onChange] = useState({\n    firstName: \"\",\n    lastName: \"\",\n    range: {\n      start: 0,\n      end: 0,\n    },\n  });\n\n  return (\n    \u003c\u003e\n      \u003cStateContext.Provider value={{ state, onChange }}\u003e\n        \u003cForm /\u003e\n      \u003c/StateContext.Provider\u003e\n      \u003cpre\u003e{JSON.stringify(state, null, 2)}\u003c/pre\u003e\n    \u003c/\u003e\n  );\n}\n\nexport default App;\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpza%2Fsimple-form-state-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielpza%2Fsimple-form-state-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpza%2Fsimple-form-state-example/lists"}