{"repo":"swan-io/use-form","free":true,"listed":false,"github":"https://github.com/swan-io/use-form","clone":"git clone https://github.com/swan-io/use-form.git","description":"A simple, fast, and opinionated form library for React & React Native focusing on UX.","language":"TypeScript","stars":214,"topics":["react","form","validation"],"license":"MIT","category":"mobile-apps","readme_excerpt":"@swan-io/use-form A simple, fast, and opinionated form library for React & React Native focusing on UX. 👉 Take a look at the demo website. Setup Features - Subscription-based field updates (avoid re-render the whole form on each keystroke 🔥) - Validation strategies ✨ - Field sanitization - Mounted-only fields validation - Advanced focus handling - Best-in-class TypeScript support - Sync and async form submission Motivation Why another React form library 🤔? Because, as silly as it seems, we couldn't find any existing library which fits our existing needs: - We want validation strategies per field because we fell in love with them when we read the re-formality documentation (which is unfortunately only available for ReScript). - It should be able to handle huge forms without a single performance hiccup. - Validation should be simple, reusable, and testable (aka just functions). - It shouldn't even try to validate unmounted fields. - It should have built-in focus management (to improve the keyboard flow of our React Native forms). Validation strategies ✨ The key of good UX is simple: validation should be executed in continue , feedback should be provided when it makes sense . Quick example: A credit card field 💳 Let's say we want to display a valid state icon (✔) when the input value is a valid credit card number but don't want to display an error until the user blurs the field (and lets the value in an invalid state). Something like this: How do we easily achieve such magic","default_branch":null,"files":null,"tree":[],"storefront":"/r/swan-io","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/swan-io/use-form/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}