<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Moving, reusing, and nesting composition on Staticvar Learn</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/</link><description>Recent content in Moving, reusing, and nesting composition on Staticvar Learn</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/index.xml" rel="self" type="application/rss+xml"/><item><title>Movable content carries identity across locations</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/01-movable-content-carries-identity/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/01-movable-content-carries-identity/</guid><description>Evidence legend: Durable marks a stable mental model; Version-specific marks behavior tied to the AndroidX pin below; Experimental marks a changing or transitional path.
A remember value normally follows its position in one composition. What if a screen changes from a row to a column, but the editor, focus, or scroll state must follow the content rather than the old branch? movableContentOf makes that relocation explicit: the call creates a tracked content identity, and a later call can claim the state and nodes that left another location.</description></item><item><title>Reusable composition changes the node lifecycle</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/02-reusable-composition-and-node-lifecycle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/02-reusable-composition-and-node-lifecycle/</guid><description>Evidence legend: Durable marks a stable mental model; Version-specific marks behavior tied to the AndroidX pin below; Experimental marks a changing or transitional path.
Movable content answers “how do I keep this identity while its location changes?” Reuse answers “how do I avoid allocating a new compatible node for different content?” The second question deliberately has a different answer for remembered values: node structure may be recycled, while remembered slots are treated as invalid for the new content.</description></item><item><title>CompositionContext makes nesting one logical tree</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/03-composition-context-and-measure-time-subcomposition/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/03-composition-context-and-measure-time-subcomposition/</guid><description>Evidence legend: Durable marks a stable mental model; Version-specific marks behavior tied to the AndroidX pin below; Experimental marks a changing or transitional path.
A subcomposition is a separate Composition, but it should not become a separate universe. A child may need values from the parent, and a parent state write may need to invalidate the child. CompositionContext is the bridge: it preserves logical ownership while allowing a layout to calculate child content later than the parent content call.</description></item><item><title>SubcomposeLayout turns slots into a reuse pool</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/04-subcompose-slots-precomposition-and-pausing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/09-moving-reusing-nesting-composition/04-subcompose-slots-precomposition-and-pausing/</guid><description>Evidence legend: Durable marks a stable mental model; Version-specific marks behavior tied to the AndroidX pin below; Experimental marks a changing or transitional path.
SubcomposeLayoutState is not just a map from IDs to lambdas. At the pinned source, LayoutNodeSubcompositionsState keeps virtual child LayoutNodes and a NodeState for each composition. Its child list has exactly three storage ranges: active children, a reusable middle section, and precomposed children waiting at the end (SubcomposeLayout.</description></item></channel></rss>