Integration of React Components with React Final Form

This guide walks you through setting up Syncfusion React components with React Final Form.

What is React Final Form?

React Final Form is a high-performance form state management solution for React that delivers functionality through a subscription-based architecture, minimizing re-renders while offering comprehensive capabilities, including both synchronous and asynchronous field and form-level validation.

Prerequisites

System requirements for Syncfusion® React UI components

Create a Vite project

To create a new Vite project, refer to the Vite documentation. Once that Vite project is ready to run with default settings, let’s add the React components to the project.

Add Syncfusion® React packages

This guide demonstrates an asynchronous field-level validation implementation of React Final Form with various Syncfusion® React components including TextBox, Button, and CheckBox. To implement these components in the project, install the @syncfusion/react-inputs, @syncfusion/react-buttons, and react-final-form packages.

Import Syncfusion® CSS styles

Syncfusion® React components are styled using built-in themes. The necessary Material CSS styles for the inputs and buttons components and its dependents are imported along with the required sample styles into the src/App.css file.

Add Syncfusion® React component with Final Form

Follow the below steps to add the Syncfusion® React component to the project:

1. Before adding the component, import the required component in the src/App.tsx file.

2. Then, add the components in the application using the following code sample.

Run the project

To run the project, use the following command:

The output will appear as follows:

See also