-
-
Save burnoo/0df8d66a1dae460f7d3acd580948371d to your computer and use it in GitHub Desktop.
Two-way data binding in Jetpack Compose 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun Screen() { | |
val viewModel = remember { ViewModel() } // or viewModel() etc. | |
val password by viewModel.password.collectAsState() | |
TextField( | |
value = password, | |
onValueChange = viewModel::onPasswordChanged | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment