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.
#
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 example of how does it works:
โจ Pretty easy right? react-cool-form
is more powerful than you think. Let's keep exploring!