react-hooks-helper icon indicating copy to clipboard operation
react-hooks-helper copied to clipboard

Array objects Support

Open wingkwong opened this issue 5 years ago • 3 comments

Does react-hooks-helper support the following structure?

{
    "foo": [
        {
            "a": "",
            "b": "",
            "c": ""
        }, 
        {
            "a": "",
            "b": "",
            "c": ""
        }
    ]
}

wingkwong avatar Sep 12 '20 11:09 wingkwong

Found a solution, use nested like this, (ie. "foo.3.a" or "foo.2.c") :

        <FormControl key={index}
                     placeholder="Acquis d'apprentissage"
                     name={"foo."+ index +".a"}
                     value={iteration.a}
                     onChange={setForm}
        />

boulledogue avatar Dec 02 '20 03:12 boulledogue

Does react-hooks-helper support the following structure? ...

What part of react-hooks-helper?

revelcw avatar Feb 01 '21 21:02 revelcw

How can we Add New Array fields through SetForm.

RishwanthPerumandla avatar May 27 '21 15:05 RishwanthPerumandla