Function useOneArray

Hook that manages an array of data.

  • Type Parameters

    • T = any

      The type of elements in the array

    Parameters

    • OptionalinitialValue: null | T[] | (() => T[])

      Optional initial value for the array

    Returns readonly [T[], Dispatch<SetStateAction<null | T[]>>]

    • A tuple containing the managed array and a function to update it