SL
Great article and discovery! Thanks a lot. One thing I discovered testing this extensively is that Espresso and Robolectric automated tests tend to kick the count = 0 + your post() tricks earlier than Compose runs the first composition. Since Compose is ~100ms late to the party, tests fail. I solved it waiting (with a 1sec timeout) for a RESUME callback from a Compose listener.