Package-level declarations
Types
Link copied to clipboard
Function type for handling completion of optimistic updates.
Link copied to clipboard
Data class representing an optimistic state with methods to apply optimistic updates.
Link copied to clipboard
Link copied to clipboard
Interface defining a policy for handling errors in optimistic updates.
Functions
Link copied to clipboard
inline fun <T> rememberOptimistic(state: T, policy: OptimisticUpdatePolicy = OptimisticUpdatePolicy): OptimisticObject<T, T>
Creates and remembers an optimistic state object where the state and optimistic value are of the same type.
fun <T, D> rememberOptimistic(state: T, policy: OptimisticUpdatePolicy = OptimisticUpdatePolicy, updateFn: OptimisticUpdate<T, D>): OptimisticObject<T, D>
Creates and remembers an optimistic state object that can track optimistic updates.