Ok, I just discovered a clue on what is going on. ...
# compose
f
Ok, I just discovered a clue on what is going on. I believe it has to do with referencing a specific object inside a composition scope. So something like this
Copy code
TopLevelComponent {
  val obj = Object()
  InnerComponent {
     useObj(obj)
  }
}
Then, I do something that will cause
TopLevelComponent
to recompose. I then rely on the fact
obj
will be a newely initialized object. However,
InnerComponent
will still keep an old version of
obj
even after recomposition, because of optimizations. This is my theory. It seems like optimization is causing some very unnatural results. I still don't know how this relates to the problems I had with remember/state but i'm sure it's related.