• This function takes in a getNetworkObject function and creates a hook with that function in it which will return a network object

    Type Parameters

    • THookParams extends unknown[]

    Parameters

    • getNetworkObject: (...args: THookParams) => Promise<undefined | NetworkObject<object>>

      A function that takes in an id string and returns a network object

    • OptionalmapParametersToNetworkObjectSource: (...args: THookParams) => undefined | string | NetworkObject<object>

      Function that takes the parameters passed into the hook and returns the networkObjectSource associated with those parameters. Defaults to taking the first parameter passed into the hook and using that as the networkObjectSource.

      • Note: networkObjectSource is string name of the network object to get OR networkObject (result of this hook, if you want this hook to just return the network object again)

    Returns (...args: THookParams) => undefined | NetworkObject<object>

    A function that takes in a networkObjectSource and returns a NetworkObject