If I'm understanding things correctly, if I pass a plain JS object created like
js("{...}")
(or with the
jsObject()
helper) to a composable function, there wouldn't be any way for the composable to know when to recompose if a property in that object changed because there's no real equality comparisons for plain JS objects. So if I want to pass data to a composable function, I don't really have a choice but to use Kotlin classes, right?
➕ 1
👀 1
a
andylamax
08/22/2021, 6:07 AM
I think even js("{. . .}") should work
j
jim
08/22/2021, 12:38 PM
@Derek Ellis If the objects are mutable, then yes, that is correct, they would need to be Kotlin so the fields can be backed by state objects.