diffOf

abstract fun <T> diffOf(input: T): Diff<T>

Returns a Diff of previous and current values of the supplied input.

Note: while this method is not a hook, it exhibits one important similarity in that it must be called unconditionally in order to ensure correctness across multiple invocations.

Return

A Diff of previous and current values of the supplied input.

Parameters

input

The input value whose diff is to be calculated. This input must have already been defined as a dependency of the useTransition call.

See also