Getting Started
Building forms in React might be a challenge. We have to face many tedious things like form data, validation, submission, and more ๐คฏ.
As a React developer, there're two strategies of implementing forms, the controlled components and uncontrolled components, each has its advantages and timing of use. The controlled components serve form state as the single source of truth. However, the uncontrolled components make our code more concise and performant.
React Cool Form combines these advantages and references the UX theory of Nielsen Norman Group as the basis for our API design to help you beat all kinds of forms ๐๐ป.
#
RequirementTo use React Cool Form, you must use react@16.8.0
or greater which includes hooks.
#
InstallationThis package is distributed via npm.
โ ๏ธ React Cool Form supports all major browsers. For older browsers (e.g. IE11) without the
async/await
,Promise
, and ES6+ features, you'll need to include a polyfill such as core-js.
#
CDNIf you're not using a module bundler or package manager. We also provide a UMD build which is available over the unpkg.com CDN. Simply use a <script>
tag to add it after React CND links as below:
Then you can access it via the window.ReactCoolForm.<moduleName>
variables.
#
ExampleHere's the basic concept of how does it rock:
โจ Pretty easy right? React Cool Form is more powerful than you think. Let's keep exploring!