I'm experimenting `ViewModel`s, and I'm creating o...
# compose
s
I'm experimenting `ViewModel`s, and I'm creating one by providing a
key
(so it does get recreated when the key changes), but it actually gets recreated everytime, even if the key is the same.
Copy code
@Composable
fun OnlineSearchTab(
    textFieldValue: TextFieldValue,
    viewModel: OnlineSearchTabViewModel = viewModel(key = textFieldValue.text)
)
What am I missing?