Skip to content

Formily vs React Hook Form

Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.

Formily

Open source · MIT

A form library for React and Vue that handles complex and JSON-schema-driven forms.

React Hook Form

Open source · MIT

A React library for building forms, handling their state and validation with hooks.

The short answer

Choose Formily if you need…

  • Frontend developers building data-heavy forms with many linked fields
  • Teams that want forms generated from JSON Schema sent by a back end
  • Projects already using Ant Design or Alibaba Fusion components
  • Teams that want a visual form builder (Designable) alongside the library

Choose React Hook Form if you need…

  • React developers building forms with several fields
  • Teams that want form validation with a schema library like Zod or Yup
  • Projects that need forms to stay responsive as they grow
  • React Native developers who want the same form approach on mobile

Side-by-side

FormilyReact Hook Form
TypeLibraryLibrary
PriceFree and open sourceFree and open source
LicenceMITMIT
GitHub stars12.6k44.9k
Setup difficultyIntermediateIntermediate
How you get itInstall with a package managerInstall with a package manager
Main languageTypeScriptTypeScript
Last code update17 months ago5 days ago

What each one is

Formily

Formily is a TypeScript form library that helps developers build forms in React, React Native, Vue 2, and Vue 3. It manages each field's state separately so large forms with many linked fields don't re-render the whole page. It also supports JSON Schema, so forms can be described as data, for example by a back end.

React Hook Form

React Hook Form is a TypeScript library for managing form state and validation in React apps, and the description says it also works with React Native. You register inputs with a hook, and it handles the values, errors, and submit flow for you. The README says it embraces native HTML form validation, works with popular validation schema libraries such as Yup and Zod, and has no dependencies.

Best for

Formily

  • Frontend developers building data-heavy forms with many linked fields
  • Teams that want forms generated from JSON Schema sent by a back end
  • Projects already using Ant Design or Alibaba Fusion components
  • Teams that want a visual form builder (Designable) alongside the library

React Hook Form

  • React developers building forms with several fields
  • Teams that want form validation with a schema library like Zod or Yup
  • Projects that need forms to stay responsive as they grow
  • React Native developers who want the same form approach on mobile

Strengths

Formily

  • The README says field state is managed independently, which aims to avoid slow re-renders in linked forms
  • Supports converting between JSON Schema and its own JSchema format
  • Released under the permissive MIT license

React Hook Form

  • The README states it is built with performance, UX and developer experience in mind
  • It has no dependencies, according to the README
  • It supports multiple validation libraries through resolvers

Not ideal for

Formily

  • Simple forms with a few inputs, where a lighter library is enough
  • Projects not using React or Vue, since the README lists only those frameworks
  • Non-developers who want a no-code form tool; the README describes it as a developer library

React Hook Form

  • People who are not writing React or React Native code, since it is a React library
  • Anyone wanting a ready-made form UI with no coding, because it provides hooks rather than visual components
  • Projects that need an exact guarantee of form performance, since the README gives no benchmarks

Trade-offs

Formily

  • The README is short and covers little API detail, so setup needs the official documentation site
  • The README mentions two website versions (1.0 and 2.0), so check you are reading the right docs

React Hook Form

  • The README is truncated and gives little detail on API behavior beyond the quickstart
  • It is specific to React, so it does not help with other frameworks
  • Validation setup depends on choosing and wiring a separate schema library

Getting started

Formily

Install the core package

npm install @formily/core
Step-by-step guide: how to use Formily

React Hook Form

Install the package

npm install react-hook-form
Step-by-step guide: how to use React Hook Form

Frequently asked questions

What is the difference between Formily and React Hook Form?

Formily: A form library for React and Vue that handles complex and JSON-schema-driven forms. React Hook Form: A React library for building forms, handling their state and validation with hooks. Formily suits frontend developers building data-heavy forms with many linked fields, while React Hook Form suits react developers building forms with several fields.

Are Formily and React Hook Form free?

Formily: Free and open source. React Hook Form: Free and open source.

Is Formily or React Hook Form more popular?

React Hook Form has more GitHub stars (44.9k) than Formily (12.6k). Popularity isn't the same as fit — check which one matches your use case above.

What are other alternatives to Formily and React Hook Form?

Other options people compare them with include VeeValidate, Ajv, VueUse, SoybeanAdmin, redux-form.

Keep comparing

Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.