https://kotlinlang.org logo
#compose
Title
# compose
e

eygraber

01/11/2022, 5:00 AM
Is there any issue with passing a
java.time.LocalDate
to a composable function, or should it be wrapped in something marked as
@Immutable
?
1
g

gildor

01/11/2022, 5:53 AM
LocalDate is immutable and has equals/hashcode, so it will be fine
a

Adam Powell

01/11/2022, 3:00 PM
It won't be treated as stable by compose but you'll be fine. Most places you'd use a single date parameter are unlikely to be heavy enough to worry about not skipping those calls.
e

eygraber

01/11/2022, 3:28 PM
Thanks!
g

gildor

01/11/2022, 3:48 PM
Adam, are there any plans to somehow allow external types to be marked as stable? Something like https://blog.jetbrains.com/using-external-annotations/
a

Adam Powell

01/11/2022, 3:49 PM
Yes
I'm not on the right laptop to have quick access to the bug tracker to find it but I think it's currently tracked as a medium priority feature
👍 1
d

dimsuz

01/11/2022, 5:35 PM
that would be nice, this question arises from time to time on our different compose-based projects.
150 Views