From c2a73883e27d7713dce6f66c8172fecf13313d0b Mon Sep 17 00:00:00 2001 From: Kamony Date: Tue, 17 Nov 2020 17:41:11 +0100 Subject: [PATCH] Update README.md --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 304807d..71fb0f1 100644 --- a/README.md +++ b/README.md @@ -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(); + const handleOnFormSave = (formSchema: FormSchemaType) => { + console.log(formData); + // do something with form data + }; + + return ( +
+ + {formData && ( + console.log(data)} data={formData} /> + )} +
+ ); +}; +~~~