var variable by remember { mutableStateOf("") } val onValueChange = { text -> variable = text } Component( name= variable, onValueChange= onValueChange ) } @Composable fun ViewContent( name : String, onValueChange : (String) -> Unit ){ // Your view }