RC

Rc Field Form

rc-field-form

React Form Component

Forms
react
react-component
react-form
form
rc-field-form
Forms
javascript
npm
frontend
open source
Stars
444
Weekly
2.0M
Open issues
6
Bundle
~25 kB

Installation

npm install rc-field-form

Code example

import { useRcFieldForm } from "rc-field-form";

export function Example() {
  const form = useRcFieldForm({ defaultValues: { email: "" } });

  function onSubmit(event: React.FormEvent<HTMLFormElement>) {
    event.preventDefault();
    console.log(form);
  }

  return (
    <form onSubmit={onSubmit}>
      <input name="email" type="email" placeholder="you@example.com" />
      <button type="submit">Submit</button>
    </form>
  );
}

Pros & cons

Pros

  • Actively maintained by smith3816@gmail.com
  • 2.0M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 6 open issues on GitHub

FAQs

Alternatives & similar libraries