I’m investigating an issue where two changes in th...
# compose
a
I’m investigating an issue where two changes in the computed value of a
derivedState
, one to a new value, and another back to the original one, cause the scope reading the value of the state to be recomposed. <more inside the thread>
In the debugger, I’m lookin at
ComposerImpl.addRecomposeScope
:
Copy code
scope.requiresRecompose = invalidation != null
marks the scope as requiring recomposition. But invalidation.isInvalid() is false (instances contains only that derived state). Shouldn’t
addRecomposeScope
check
invalidation.isInvalid()
before marking the scope as requiring recomposition?
b
I very quickly tried to reproduce this but it worked correctly. Do you have a test case? If you do, I would file a bug
a
Unfortunately I haven’t been able to reproduce it on short examples.