on

fun <T, S> on(id: MutationId<T, S>, snapshot: () -> MutationState<T>)

Registers a preview state for the mutation with the specified ID.

Parameters

id

The mutation ID that identifies this mutation

snapshot

A function that provides the mutation state to be returned for this ID


fun <T, S> on(testTag: MutationTestTag<T, S>, snapshot: () -> MutationState<T>)

Registers a preview state for the mutation with the specified test tag.

Parameters

testTag

The test tag that identifies this mutation

snapshot

A function that provides the mutation state to be returned for this tag