rememberSubscriptionIf

fun <T, V> rememberSubscriptionIf(value: V, keyFactory: (value: V) -> SubscriptionKey<T>?, config: SubscriptionConfig = SubscriptionConfig.Default, client: SubscriptionClient = LocalSubscriptionClient.current): SubscriptionObject<T>?
fun <T, U, V> rememberSubscriptionIf(value: V, keyFactory: (value: V) -> SubscriptionKey<T>?, select: (T) -> U, config: SubscriptionConfig = SubscriptionConfig.Default, client: SubscriptionClient = LocalSubscriptionClient.current): SubscriptionObject<U>?

Provides a conditional rememberSubscription.

Calls rememberSubscription only if keyFactory returns a SubscriptionKey from value.

See also