Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamony authored Nov 17, 2020
1 parent 18e4304 commit c2a7388
Showing 1 changed file with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,45 @@
**React Form Architect** is an ultimate solution for creating and rendering forms in React.
Its main focus is to provide users with a tool to define, render and share a form in a browser.

All in a way that can be done by any non-programming beings.
All in a way that can be done by a non-programming being.

Check out the [main page](https://kamony.github.io/rfa/) with documentations and examples
## => [documentation and examples](https://kamony.github.io/rfa/) <=


# Installation

To install **React Form Architect** to your project run command
~~~ bash
yarn add rfa
~~~
or
~~~ bash
npm i rfa
~~~

**React Form Architect** is completely written in Typescript, therefore all types are already bundled within the package

# Using RFA
Minimal working example
~~~ tsx
import React from 'react';
import { FormRenderer, FormArchitect } from 'rfa';
import type { FormSchemaType } from 'rfa';

const App = () => {
const [formData, setFormData] = React.useState<FormSchemaType>();
const handleOnFormSave = (formSchema: FormSchemaType) => {
console.log(formData);
// do something with form data
};

return (
<div>
<FormArchitect onSave={handleOnFormSave} />
{formData && (
<FormRenderer onSubmit={(data) => console.log(data)} data={formData} />
)}
</div>
);
};
~~~

0 comments on commit c2a7388

Please sign in to comment.