Need help with react-final-form-hooks?
Click the β€œchat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

470 Stars 21 Forks MIT License 60 Commits 30 Opened issues


React Hooks to bind to 🏁 Final Form's high performance subscription-based form state management engine

Services available


Need anything else?

Contributors list

🏁 React Final Form Hooks

React Final Form Hooks

Backers on Open Collective Sponsors on Open Collective NPM Version NPM Downloads Build Status styled with prettier

βœ… Zero dependencies

βœ… Only peer dependencies: React and 🏁 Final Form

βœ… Opt-in subscriptions - only update on the state you need!

βœ… πŸ’₯ 1.2 kB gzipped πŸ’₯


npm install --save react-final-form-hooks final-form


yarn add react-final-form-hooks final-form

Getting Started

🏁 React Final Form Hooks is the leanest possible way to connect 🏁 Final Form to React, to acheive subscriptions-based form state management using the Observer pattern.

⚠️ This library will re-render your entire form on every state change, as you type. ⚠️

If performance is your goal, you are recommended to use 🏁 React Final Form. Also, that library does many other things for you, like managing checkbox and radio buttons properly. RFFHooks leaves all of that work to you. By default, 🏁 React Final Form Hooks subscribes to all changes, but if you want to fine tune your form, you may specify only the form state that you care about for rendering your gorgeous UI.

Here's what it looks like in your code:

import { useForm, useField } from 'react-final-form-hooks'

const MyForm = () => { const { form, handleSubmit, values, pristine, submitting } = useForm({ onSubmit, // the function to call with your form values upon valid submit validate // a record-level validation function to check all form values }) const firstName = useField('firstName', form) const lastName = useField('lastName', form) return (

{firstName.meta.touched && firstName.meta.error && ( {firstName.meta.error} )}
{lastName.meta.touched && lastName.meta.error && ( {lastName.meta.error} )}
Submit ) }

Table of Contents

What's the difference between
and the hooks introduced in
react-final-form v5

Great question. The TL;DR is this:

  • react-final-form-hooks
    is a lightweight, simple solution for quickly getting a form up and running in a single render function, but allows for no performance optimization.
  • react-final-form v5
    is a more robust, battle-tested solution that involves creating more components and structure around your form.

does not put the
instance into the React context, but rather forces you to pass the
instance to
so that the field can register itself with the form. This allows you to create your entire form in a single functional component, like the
example above. It will also, by necessity, rerender your entire form on every value change.

react-final-form v5
requires that you wrap your entire form in a
 component that provides the 
instance via context to its descendants. This means that you cannot use
in the same function that is rendering your

, because 
must be inside the


Conclusion: If your app has a couple of small (< 20 inputs) forms where you aren't doing anything fancy with reusable custom input components,

might be all you need. But if your app is bigger and more sophisticated, or you need to optimize for performance, you should probably use


Simple Example

Shows how to create fields and attach them to



The following can be imported from



Returns an object similar to


takes four parameters:

name : string

The name of the field. Required.

form : Form

The object returned from

. Required.

validate? : (value:any) => any

A field-level validation function that takes the current value and returns

if it is valid, or the error if it is not. Optional.

subscription? : FieldSubscription

A subscription of which parts of field state to be notified about. See

. Optional.


Returns an object similar to


takes two parameters:

onSubmit : (values:Object) => ?Object | Promise | void

See 🏁 Final Form's

docs for more information. Required.

validate?: (values:Object) => Object | Promise

A record level validation function. See 🏁 Final Form's

docs for more information. Optional.


This project exists thanks to all the people who contribute. [Contribute].


Thank you to all our backers! πŸ™ [Become a backer]


Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.