If I'm understanding things correctly, if I pass a...
# compose-web
d
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
I think even js("{. . .}") should work
j
@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.
👍 1
🙏 1