realue • Docs
realue / useArray
useArray<
A
,G
,T
,E
>(props
,itemId
):ItemCallable
<T
,E
>
Takes an array and returns a function that generates the required props for handling an array item value.
That function also contains three callables: loop
, add
, and remove
.
• A extends undefined
| readonly any
[]
• G extends ErrorReportArray
<NonNullable
<A
>>
• T = NonNullable
<A
> extends readonly H
[] ? H
: never
• E extends ErrorReportArray
<any
> = ErrorReport
<T
>
• props: NevoProps
<A
, G
>
Properties according to the NEVO pattern, where the value
holds an array.
• itemId: ItemId
<T
> = itemIdDefault
An optional function that returns a unique identifier for a given array item
.
ItemCallable
<T
, E
>
The item
function that returns the props for a specific item index
.