[KongchangAI]
Product

SideEffect

The lightest side-effect API in Jetpack Compose. It executes synchronously after every successful recomposition and is used to synchronize external state into composition.

Timeline (last 90 days)

Oct 30

Compose's effect APIs form a spectrum from high functionality to low latency: LaunchedEffect is the most full-featured but the most costly, DisposableEffect suits setup/teardown pairing, SideEffect with a key (introduced in Compose 1.12) is a low-cost replacement for one-off events, and the native SideEffect is the cheapest.

Unverified50%
Oct 30

When migrating effect APIs, note the execution order: DisposableEffect runs first, then ordinary SideEffect, and LaunchedEffect, because it involves scheduling, does not run until after the frame ends.

Unverified50%

All Facts (2)

Source Articles