Skip to content

v0.3.0

Latest

Choose a tag to compare

@kmpbits kmpbits released this 17 Aug 14:52
· 1 commit to main since this release

Added

  • LoadState<T, F> — a Loading/Success/Failure sealed state, plus a
    matching SkeletonContainer(state, onFailure, content) overload for it.
    Unlike the isFailure/dataOrNull overload, state's shape is fixed
    to LoadState in exchange for onFailure receiving a concretely typed
    failure payload with no cast required. Loading isn't special-cased by
    the overload — it's whatever state isn't Success or Failure, so
    the shimmer shows automatically with no extra branching needed.
    Demonstrated in the sample app via LoadStatePostCard.

Changed

  • SkeletonContainer(state, dataOrNull, isFailure, onFailure, content)'s
    onFailure slot is now @Composable (S) -> Unit, receiving the failure
    state directly instead of requiring callers to re-derive it from the
    outer state.