{"id":19865198,"url":"https://github.com/angelhtml/react_hook_yup","last_synced_at":"2026-04-02T03:02:35.422Z","repository":{"id":110677624,"uuid":"523752814","full_name":"angelhtml/react_hook_yup","owner":"angelhtml","description":"react hook form with yup example","archived":false,"fork":false,"pushed_at":"2023-05-29T18:19:36.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T14:21:54.523Z","etag":null,"topics":["angelcodestyle","axios","axios-react","cors","expressjs","form","javascript","jsx","nextjs","nodejs","reacthookform","reactjs","validation","yup","yup-validation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/angelhtml.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}},"created_at":"2022-08-11T14:23:43.000Z","updated_at":"2022-08-11T15:05:44.000Z","dependencies_parsed_at":"2024-11-12T19:34:02.485Z","dependency_job_id":null,"html_url":"https://github.com/angelhtml/react_hook_yup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angelhtml/react_hook_yup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelhtml%2Freact_hook_yup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelhtml%2Freact_hook_yup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelhtml%2Freact_hook_yup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelhtml%2Freact_hook_yup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angelhtml","download_url":"https://codeload.github.com/angelhtml/react_hook_yup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angelhtml%2Freact_hook_yup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"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":["angelcodestyle","axios","axios-react","cors","expressjs","form","javascript","jsx","nextjs","nodejs","reacthookform","reactjs","validation","yup","yup-validation"],"created_at":"2024-11-12T15:21:37.075Z","updated_at":"2026-04-02T03:02:35.397Z","avatar_url":"https://github.com/angelhtml.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eReact Hook Form\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/code_style-Angel-ff0000.svg\" alt=\"angel code style\"/\u003e\n\u003c/p\u003e\n\n\u003cp\u003emanage your data using with react hook form and yup and send it to your server \u003c/p\u003e\n\n\u003ch1\u003e📜libraries\u003c/h1\u003e\n\u003cul\u003e\n  \u003cli\u003eReact js or Next js\u003c/li\u003e\n  \u003cli\u003eReact hook form\u003c/li\u003e\n  \u003cli\u003eyup\u003c/li\u003e\n  \u003cli\u003eAxios\u003c/li\u003e\n  \u003cli\u003eExpress js\u003c/li\u003e\n  \u003cli\u003eCors\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cp\u003ein client folder you can see the react hook form and yup tool and axios that can send your data to server\u003c/p\u003e\n\n``` javascript\n const userSchema = yup.object().shape({\n    Username: yup.string().required(),\n    Age: yup.string().required(),\n  });\n\n  const { register:registeruser, handleSubmit:handleSubmituser, formState: { errors:errorsuser }, reset:resetuser } = useForm({\n    resolver: yupResolver(userSchema),\n  });\n  //posting your data from yup to server\n  const onSubmitHandleruser = (data) =\u003e {\n    axios({\n        method: 'post',\n        url: `http://localhost:3001/api/user`,\n        data: data,\n      })\n    .then(function (response) {\n      setDatas(response.data)\n      setLoading(true)\n      //console.log(response)\n      }).catch(function (error) {\n        console.log(error);\n      }) \n  }; \n```\n\n\u003cp\u003ethe server folder is a basic express server that will be available response your requests\u003c/p\u003e\n\n``` javascript\napp.post(\"/api/user\", (req, res) =\u003e {\n    const username = req.body.Username;\n    const age = req.body.Age;\n    res.send({\"name\" : username, \"age\" : age})  \n    console.log(\"data receive\")\n});\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelhtml%2Freact_hook_yup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangelhtml%2Freact_hook_yup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangelhtml%2Freact_hook_yup/lists"}