From c0aa9d7fa994f6199c3abc048cc02c202fa7da83 Mon Sep 17 00:00:00 2001 From: Nikhil Agarwal <54072321+nikhilag@users.noreply.github.com> Date: Thu, 15 Apr 2021 10:28:03 +0530 Subject: [PATCH] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7a933b3..a70c6d6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,10 @@ The idea behind ths library is to use Recoil for managing a form and treat state - useField - To be used in field components for capturing change, getting value and for validation - useWatch / useMultipleWatch - This allows you to watch other fields in the form and so just this component renders when those other fields render. - useFormValues - Listen to the form values in real-time but the best part here is that only this particular component will render again. Hence you can get all values without a re-render of the entire form -- useIsDirty - This is a WIP but it will allow you to capture dirty state of the form. +- useIsDirty - This allows you to capture if the form has been modified. - useFieldArray - This is an efficient way of managing field arrays where you need to use a table or something similar for data entry. This allows you to append rows, remove rows, etc. Sticking to the philosophy of this library, only those fields/cells will render which are being modified. It is already being used in production in multiple internal projects. However, we don't have enough examples and documentation for this yet but we will add that soon. To get started for now, you can look at the 2 examples already added. + +# Install +`yarn add react-recoil-form recoil immer`