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[], any]

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