1"use strict";(self.webpackChunkkoprowski_it=self.webpackChunkkoprowski_it||[]).push([[8649],{9403:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>m,frontMatter:()=>n,metadata:()=>s,toc:()=>c});var o=a(5893),i=a(1151);const n={slug:"react-native-form-validation-with-react-hook-form-usecontroller",title:"Handy form validation in React Native with react-hook-form useController",description:"Managing forms in React Native is different than in React. Custom components need callbacks or wrappers, which can make code hard to read. Here is my proposal handy solution for React Native form validation!",image:"https://d.koprowski.it/file/koprowski-it/posts/2021/hero-react-native-form-validation.jpg",date:new Date("2021-02-02T00:00:00.000Z"),authors:"dkoprowski",tags:["programming","reactnative","javascript"]},r=void 0,s={permalink:"/blog/react-native-form-validation-with-react-hook-form-usecontroller",source:"@site/content/blog/2021/02-form-validation.md",title:"Handy form validation in React Native with react-hook-form useController",description:"Managing forms in React Native is different than in React. Custom components need callbacks or wrappers, which can make code hard to read. Here is my proposal handy solution for React Native form validation!",date:"2021-02-02T00:00:00.000Z",tags:[{inline:!0,label:"programming",permalink:"/blog/tags/programming"},{inline:!0,label:"reactnative",permalink:"/blog/tags/reactnative"},{inline:!0,label:"javascript",permalink:"/blog/tags/javascript"}],hasTruncateMarker:!0,authors:[{name:"Daniel Koprowski",title:"Software Engineer & Tech Productivity Advocate",url:"https://www.koprowski.it",imageURL:"/img/avatar.64.webp",key:"dkoprowski"}],frontMatter:{slug:"react-native-form-validation-with-react-hook-form-usecontroller",title:"Handy form validation in React Native with react-hook-form useController",description:"Managing forms in React Native is different than in React. Custom components need callbacks or wrappers, which can make code hard to read. Here is my proposal handy solution for React Native form validation!",image:"https://d.koprowski.it/file/koprowski-it/posts/2021/hero-react-native-form-validation.jpg",date:"2021-02-02T00:00:00.000Z",authors:"dkoprowski",tags:["programming","reactnative","javascript"]},unlisted:!1,lastUpdatedAt:1741982554e3,prevItem:{title:"How to configure import alias in React Native",permalink:"/blog/import-alias-in-react-native-and-vscode"},nextItem:{title:"What are the benefits of mobile app session recording",permalink:"/blog/mobile-app-session-recording-with-smartlook"}},l={authorsImageUrls:[void 0]},c=[];function d(e){const t={li:"li",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Managing forms in React Native is different than in web React. We don\u2019t have shortcuts and HTML to register field through ref. I wanted to create a handy solution that satisfies those requirements:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"easy to understand,"}),"\n",(0,o.jsx)(t.li,{children:"scalable,"}),"\n",(0,o.jsx)(t.li,{children:"reusable,"}),"\n",(0,o.jsx)(t.li,{children:"minor boilerplate,"}),"\n",(0,o.jsx)(t.li,{children:"hook centric."}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"After days of experiments, I managed to create a solution that made me satisfied. This article is a summary of my work. I believe this will be helpful to you."})]})}function m(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},1151:(e,t,a)=>{a.d(t,{Z:()=>s,a:()=>r});var o=a(7294);const i={},n=o.createContext(i);function r(e){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.