<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Snapshots and observable state on Staticvar Learn</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/</link><description>Recent content in Snapshots and observable state on Staticvar Learn</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/index.xml" rel="self" type="application/rss+xml"/><item><title>A state object is a record chain</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/01-a-state-object-is-a-record-chain/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/01-a-state-object-is-a-record-chain/</guid><description>Status: A state object owning versioned records is Durable . The linked-list fields, snapshot-ID algorithm, and record-reuse helpers are Version-specific at the pinned revision.
Outcome Given a MutableState, you should be able to explain why the same object can return different values in different snapshots without copying every object it references.
The object owns versions, not a copied object graph StateObject is the snapshot module’s interface for an object with state records.</description></item><item><title>Snapshots isolate values</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/02-snapshots-isolate-values/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/02-snapshots-isolate-values/</guid><description>Status: A snapshot is an isolated view of snapshot-aware state, not a lock or a copied application graph. That model is Durable . The GlobalSnapshot, MutableSnapshot, and nested-snapshot classes are Version-specific at the pinned revision.
Outcome Given a state write inside a snapshot, you should be able to say who can see it now, who can see it after a child apply, and who can see it after the parent applies.</description></item><item><title>Apply is a commit attempt</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/03-apply-is-a-commit-attempt/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/03-apply-is-a-commit-attempt/</guid><description>Status: Apply is a visibility and conflict boundary, not a recomposition command. That separation is Durable . The previous/current/applied comparison and SnapshotApplyResult classes are Version-specific at the pinned revision.
Outcome Given two mutable snapshots that write the same state object, you should be able to predict whether the second apply succeeds, fails, or asks a mutation policy to merge values.
Apply closes an isolation interval A mutable snapshot accumulates modified StateObjects.</description></item><item><title>Mutation policies decide equivalence</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/04-mutation-policies-decide-equivalence/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/04-mutation-policies-decide-equivalence/</guid><description>Status: A mutation policy defines the state layer’s notion of equivalence and optional conflict merge. That role is Durable . The stock implementations and exact merge path are Version-specific at the pinned revision.
Outcome Given two assignments or two competing snapshot writes, you should be able to predict when a policy treats them as equivalent and when it permits a merge.
Equivalence is a state decision SnapshotMutationPolicy&amp;lt;T&amp;gt; has two operations.</description></item><item><title>Reads become observation edges</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/05-reads-become-observation-edges/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/05-reads-become-observation-edges/</guid><description>Status: Turning a read into an observation edge is Durable . The composition maps, reader flags, apply queue, and executor behavior are Version-specific at the pinned revision.
Outcome After a state read, you should be able to identify the recorded edge and distinguish it from the later work that a scheduler may perform.
A read has an owner SnapshotMutableState documents the central boundary: reading value during a composable subscribes the current RecomposeScope to that value, while writes are transacted through snapshots (SnapshotMutableState.</description></item><item><title>`derivedStateOf` tracks dependencies and values</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/06-derived-state-tracks-dependencies-and-values/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/05-snapshots-and-observable-state/06-derived-state-tracks-dependencies-and-values/</guid><description>Status: Derived state as cached state plus dependency tracking is Durable . ResultRecord, nested read levels, readable hashes, and observer maps are Version-specific at the pinned revision.
Outcome Given a derivedStateOf calculation, you should be able to explain what is cached, which state objects are dependencies, and why an unchanged derived result can avoid a downstream observation change.
It is a state object with a calculation record derivedStateOf { .</description></item></channel></rss>