Closed edpichler closed 6 months ago
For now we support 2 syntaxes:
Default
var total by useState(0.0)
With extended setter
val (total, setTotal) = useState(0.0)
JFYI For such questions you can use official Kotlin Slack - in common case you will receive answer faster
My bad! I was using =
instead of by
to declare my variable.
I need to pass a Double as a parameter in a method, although, the origin is from a hook.
So I have:
var total = useState(0.0)
How can I cast it as a Double? Or get the Double value?
I am having a hard time finding the syntax.