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

Rafs

06/24/2022, 7:11 AM
Is it advisable to create inner functions in compose, is there any performance hit to doing something like this or should inner functions be strictly remembered?
Copy code
@Composable
fun App(){
    fun someInnerComputationFunction(input: Int): Int{
       //do some computation and return an integer
    }
 
 Box(modifier = Modifier.fillMaxSize()){

 }
  
}
c

chatterInDaSkull

06/24/2022, 4:54 PM
You shouldn’t face any performance problems because you have an inner function. What might cause a problem is your inner function is executed and has some heavy computations are happening
37 Views