Where are you reading the source code?
If you are reading in an IDE or on
cs.android.com, you can easily follow the call hierarchy and find
this, which is where state reads and writes during composition are recorded.
And
here is what happens when states are written outside composition.