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

Sumit Sharma

09/08/2020, 5:49 AM
Hi all, hope you all good, I have a question regarding @Model Annotation in Jetpack library. What does it mean and how can I use it in my JetPack Compose project. Which dependency contains it. Sorry for my bad English. Thanks
r

romainguy

09/08/2020, 5:50 AM
@Model
was used in previous iterations of Compose, but you should now
mutableStateOf()
instead
👍 1
s

Sumit Sharma

09/08/2020, 5:52 AM
Thnx for your quick reply
@Model data class DonutSection( var amount: Float, var color: Color)
Is this Annotation removed because when I write `@Model`l it showing error.
g

gildor

09/08/2020, 6:06 AM
@Model
is removed and replaced with manual usage of mutableStateOf(), it’s essentially different approach, Model had many different issues
👍 1
s

Sumit Sharma

09/08/2020, 6:52 AM
Ok thnk for the help.