remember

Functions summary

inline T
@Composable
<T : Any?> remember(crossinline calculation: @DisallowComposableCalls () -> T)

Remember the value produced by calculation.

Cmn
inline T
@Composable
<T : Any?> remember(
    key1: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
)

Remember the value returned by calculation if key1 compares equal (==) to the value it had in the previous composition, otherwise produce and remember a new value by calling calculation.

Cmn
inline T
@Composable
<T : Any?> remember(
    vararg keys: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
)

Remember the value returned by calculation if all values of keys are equal (==) to the values they had in the previous composition, otherwise produce and remember a new value by calling calculation.

Cmn
inline T
@Composable
<T : Any?> remember(
    key1: Any?,
    key2: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
)

Remember the value returned by calculation if key1 and key2 are equal (==) to the values they had in the previous composition, otherwise produce and remember a new value by calling calculation.

Cmn
inline T
@Composable
<T : Any?> remember(
    key1: Any?,
    key2: Any?,
    key3: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
)

Remember the value returned by calculation if key1, key2 and key3 are equal (==) to values they had in the previous composition, otherwise produce and remember a new value by calling calculation.

Cmn

Functions

remember

@Composable
inline fun <T : Any?> remember(crossinline calculation: @DisallowComposableCalls () -> T): T

Remember the value produced by calculation. calculation will only be evaluated during the composition. Recomposition will always return the value produced by composition.

remember

@Composable
inline fun <T : Any?> remember(
    key1: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
): T

Remember the value returned by calculation if key1 compares equal (==) to the value it had in the previous composition, otherwise produce and remember a new value by calling calculation.

@Composable
inline fun <T : Any?> remember(
    vararg keys: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
): T

Remember the value returned by calculation if all values of keys are equal (==) to the values they had in the previous composition, otherwise produce and remember a new value by calling calculation.

remember

@Composable
inline fun <T : Any?> remember(
    key1: Any?,
    key2: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
): T

Remember the value returned by calculation if key1 and key2 are equal (==) to the values they had in the previous composition, otherwise produce and remember a new value by calling calculation.

remember

@Composable
inline fun <T : Any?> remember(
    key1: Any?,
    key2: Any?,
    key3: Any?,
    crossinline calculation: @DisallowComposableCalls () -> T
): T

Remember the value returned by calculation if key1, key2 and key3 are equal (==) to values they had in the previous composition, otherwise produce and remember a new value by calling calculation.