• Gets an array of data providers based on an array of input sources

    Type Parameters

    • EachDataProviderName extends (keyof DataProviders)[]

    Parameters

    • dataProviderSources: (
          | undefined
          | EachDataProviderName[number]
          | DataProviders[EachDataProviderName[number]]
      )[]

      Array containing string names of the data providers to get OR data providers themselves (i.e., the results of useDataProvider/useDataProviderMulti) if you want this hook to return the data providers again. It is fine to have a mix of strings and data providers in the array.

      WARNING: THE ARRAY MUST BE STABLE - const or wrapped in useState, useMemo, etc. It must not be updated every render.

    Returns (undefined | DataProviders[EachDataProviderName[number]])[]

    An array of data providers that correspond by index to the values in dataProviderSources. Each item in the array will be (a) undefined if the data provider has not been retrieved or has been disposed, or (b) a data provider if it has been retrieved and is not disposed.