rememberMutation

fun <T, S> rememberMutation(key: MutationKey<T, S>, config: MutationConfig = MutationConfig.Default, client: MutationClient = LocalMutationClient.current): MutationObject<T, S>

Remember a MutationObject and subscribes to the mutation state of key.

Return

A MutationObject each the mutation state changed.

Parameters

T

Type of the return value from the mutation.

S

Type of the variable to be mutated.

key

The MutationKey for managing mutation associated with id.

config

The configuration for the mutation. By default, it uses the MutationConfig.Default.

client

The MutationClient to resolve key. By default, it uses the LocalMutationClient.