Nicodemus Ojwee
09/17/2020, 12:39 PMval (myValue, setMyValue) = useState(Int.MAX_VALUE)
When i use an Int as below:
val (myValue, setMyValue) = useState(Int)
I get an error when trying to access or pass myValue to a function that requires an Int saying:
Type mismatch: Required Int, Found Int.Companion
Can someone help me explain why this is happening and what those two mean?Big Chungus
09/17/2020, 1:09 PMBig Chungus
09/17/2020, 1:11 PMval intValue: Int = Int.MAX_VALUE
val intCompanionType: Int.Companion = Int