@logixjs/react
    Preparing search index...

    Function useModuleList

    • A hook to manage a dynamic list of Module instances. It ensures that the Module instance for a given ID remains stable across renders, which is crucial for preserving the identity of the module (and its state/subscriptions).

      Type Parameters

      • T
      • M

      Parameters

      • items: T[]

        The source data array.

      • keyFn: (item: T) => string

        A function to extract a unique key (ID) from an item.

      • factory: (id: string, item: T) => M

        A function to create a new Module instance for a given ID and item.

      Returns M[]

      An array of Module instances corresponding to the items.