Is it advisable to create inner functions in compo...
# compose
r
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
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