Skip to content

Commit c76c686

Browse files
authored
Merge pull request #1205 from rvsia/updateIntroduction
Update introduction page
2 parents d60081d + fe4291d commit c76c686

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

packages/react-renderer-demo/src/pages/introduction.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@ import CodeExample from '@docs/code-example';
55

66
# Data Driven Forms Introduction
77

8-
Data Driven Forms converts JSON form definitions (schemas) into fully functional React forms with the provided set of features.
8+
Data Driven Forms is a React library that renders a form and manages its state. Main features of this approach are:
99

10-
## Form state management
11-
12-
Data Driven Forms uses [React Final Form](https://github.com/final-form/react-final-form) for the form state management. It is recommended to check their documentations first to fully understand how the [Data Driven Forms](https://github.com/data-driven-forms/react-forms) libraries work. However, it's not required to use DDF library.
10+
-**all components and form functionality is implemented in one place**, so all forms accross the whole application work and look the same,
11+
-**form schemas can be stored as a JSON value** and loaded dynamically from API,
12+
-**all forms are easily customizable and extendable** (for example, changing field from one component to another is just a matter of rewriting one string),
13+
- ○ forms can be written by non-developer persons,
14+
- ○ forms can be shared between different applications,
15+
-**Data Driven Forms implements [React Final Form](https://github.com/final-form/react-final-form)** as the form manager, so all advanced form features such as validation are available,
16+
- ○ Data Driven Forms implements **custom form features such as conditions, actions, custom validators**, etc.
17+
- ○ Data Driven Forms provides utitilites for writing complex components such as **Wizard, Dual List Selector or asynchronous select**.
18+
- ○ The library provides multiple already implemented component mappers: **MUI, Ant, Patternfly,** ...
1319

14-
## Schema
20+
To start implementing a form in Data Driven Forms, you need to provide four props:
1521

16-
[A schema](/schema/introduction) is a JSON object controlling the whole form. Using schema you define form fields and its attributes.
22+
-`onSubmit` a function that is called on submit,
23+
-`schema` a JSON object describing the form, [read more](/schema/introduction).
24+
-`componentMapper` a set of components used in the form, [custom one](/mappers/custom-mapper) or [one of the provided ones](/provided-mappers/component-api),
25+
-`FormTemplate` [a React component](/components/form-template) that structures and renders form fields and form buttons.
1726

1827
## How to start
1928

@@ -23,8 +32,20 @@ Then you can import `FormRenderer` from the `@data-driven-forms/react-form-rende
2332

2433
Following example shows basic usage of Data Driven Forms library with our [Material UI mapper](/provided-mappers/mui-component-mapper).
2534

35+
<img src="https://user-images.githubusercontent.com/32869456/153852549-01ea7f97-b80b-4afe-a0f2-73bf0f4db972.png" width="100%" />
36+
2637
<CodeExample source="components/get-started/get-started" mode="preview" />
2738

39+
<br />
40+
41+
---
42+
43+
## Form state management
44+
45+
Data Driven Forms uses [React Final Form](https://github.com/final-form/react-final-form) for the form state management. You can check their documentations first to fully understand how the [Data Driven Forms](https://github.com/data-driven-forms/react-forms) libraries work. However, it's not required to use DDF library.
46+
47+
---
48+
2849
## Articles
2950

3051
Following articles can give you more insights about Data Driven Forms and why/how to use it in you projects.
@@ -37,9 +58,11 @@ Following articles can give you more insights about Data Driven Forms and why/ho
3758

3859
[This article](https://medium.com/javascript-in-plain-english/data-driven-form-building-in-react-30768b49e625) presents basics of the data driven form building. It is a great point to start if you are new with this library.
3960

61+
---
62+
4063
## Comparison with other form libraries
4164

42-
### Form state management
65+
### Form state managers
4366

4467
You can find many of already existing and well-established libraries such as Formik, React Hook Form, or React Final Form. These libraries are focused on providing form state management solutions. Data Driven Forms is using one of them - React Final Form - to enhance the developer experience and to provide consistent way for building complex forms. Form state management is completely abstracted in Data Driven Forms, so developers can focus on the only thing that really matters - building the most accessible web forms.
4568

0 commit comments

Comments
 (0)