Slackbot
04/15/2026, 12:03 PMMark Murphy
04/15/2026, 12:12 PMI find Compose impossible to understandWhat you are seeking are details of Compose internals. Please bear in mind that the vast majority of Compose developers do not need this. That said, there are existing resources that cover this material, such as Jorge Castillo's book.
Mark Murphy
04/15/2026, 12:18 PMyschimke
04/15/2026, 1:10 PMKirill Grouchnikov
04/15/2026, 1:42 PMshikasd
04/17/2026, 8:34 PMSlotTable holds the data about groups and slots for composition
Composer is an abstraction that modifies and reads SlotTable. It is responsible for handling startGroup / endGroup calls, so the slot table remains in the correct shape.
Composition glues together Composer , Applier, state observations and other things that composition does.
CompositionContext is an abstraction over parent-child relationship between compositions. Recomposer is a root driver that keeps the clock running, and most methods in the context just delegate there, but some things like CompositionLocalMap needs to be passed through when creating subcompositions.shikasd
04/17/2026, 8:40 PMLayoutNode etc.
You don't need to understand every single detail about composition, states and others to efficiently use those APIs. It is useful no doubt, but it simply takes too much time to understand every little edge case that was covered when implementing some of those elements.
In many cases, reading commit messages should give you some history for the decisions if you are interested. Some more tricky lines (cough.. derived state.... cough..) have layers of those decisions that are hard to explain without looking at the tests.shikasd
04/19/2026, 4:25 PMshikasd
04/19/2026, 4:26 PMshikasd
04/21/2026, 10:55 AMshikasd
04/23/2026, 3:24 PMdidn't shed much light on what I didn't already know
tbh it is enough to hand roll a small version of Compose imo :) For other questions, see the comment above
For nested subcompositions, I recommend looking through SubcomposeLayout (which is also a bit of a mess admittedly). The idea is that some compositions might happen out of phase e.g. during measure and layout phases. The subcompositions keep composition local context of the parent group and some other things making it a tree