Jetpack Compose 1.13.0 Deprecates Form Input APIs, Stabilizes List Prefetch and Exit Snapshots
The deprecation wave makes every Compose app with a custom input field or slider a migration target; the new stable APIs for list prefetch and exit animations remove long-standing workarounds for scroll jank and content disappearing during dismissals. Teams on older Compose versions need to plan the upgrade, especially with the requirement for Kotlin 2.2 and compileSdk 37.1.
Jetpack Compose 1.13.0 brings a wave of API deprecations that will touch nearly every form in existing apps. BasicTextField with onValueChange and VisualTransformation are deprecated, and the stateless overloads of Slider and RangeSlider are gone. The replacement is a state-driven model: TextField and OutlinedTextField now take TextFieldState, and formatting goes through InputTransformation and OutputTransformation. For length limits, maxLengthReject rejects an entire paste that would exceed the limit, while maxLengthTrim keeps only the characters that fit. The release also stabilizes LazyLayoutCacheWindow, allowing developers to configure how much content is prefetched ahead of and behind the scroll viewport. Defaults adapt to visible item sizes between 10% and 50% of the viewport for the ahead fraction, with no behind fraction unless configured.
New exit animation support comes via CapturedAnimatedVisibility, which releases the child composition immediately and draws a snapshot of the last frame during the exit phase, solving the common problem of content vanishing before the fade-out completes. Progressive blur via BlurRadiusSpec.verticalGradient lets developers apply a gradient blur to images on Android 13 and above. Foundation also adds PolygonShape and MorphPolygonShape for clipping and morphing shapes. Performance tooling improves with computedStateOf for recomposition only on value change, Perfetto tracing that records state reads and writes, and a UI test failure policy that saves screenshots and semantic trees.
The shift from value-driven to state-driven text fields signals a commitment to a single source of truth, reducing the need for side-effect management in forms.
CapturedAnimatedVisibility directly addresses the long-standing issue of exit animations showing empty containers; its snapshot approach is a pragmatic solution for stateless exit content.
LazyLayoutCacheWindow's default adaptive strategy means most lists won't need manual tuning; the manual API only matters for image-heavy lists where prefetch cost is measurable.
Just upgraded to 1.13, cachewindow is a bit like RecyclerView.