https://kotlinlang.org logo
t

tad

08/20/2021, 12:08 AM
Just to clarify: If I log something during recomposition of the top-level function of my Compose app, and that log occurs every 16 milliseconds, then one of the arguments to the top-level function has "changed" according to Compose?
z

Zach Klippenstein (he/him) [MOD]

08/20/2021, 12:10 AM
Or some state read in that recompose scope might have changed
t

tad

08/20/2021, 12:10 AM
Okay, so anything in a
State
container within the body of the function
or read in the body of the function
z

Zach Klippenstein (he/him) [MOD]

08/20/2021, 12:11 AM
it’s a little more complicated, but basically yea
t

tad

08/20/2021, 12:11 AM
I know this has been asked before, but is there a way to figure out what state has changed?
z

Zach Klippenstein (he/him) [MOD]

08/20/2021, 12:12 AM
you could put a breakpoint in the compose runtime’s snapshot observer i guess
i can’t remember off the top of my head if there’s a convenient single place to do that, or where it is
t

tad

08/20/2021, 12:17 AM
observeReads
maybe
👍🏻 1
c

CLOVIS

08/20/2021, 7:36 AM
React has a browser extension with a profiler that says exactly which component re-rendered and why. It'd be nice a Compose to have that as well.
plus1 1
3 Views