Where is the "viewModel()" method in Androids Compose State documentation coming from?

Viewed 2174

Androids compose / state documentation contains a sample referring to a mysterious viewModel() function or method, but as the documentation has left out all import statements I can't for the life of me figure out where this function is coming from..

enter image description here

2 Answers

Obviously figured it out 2 minutes after giving up and posting the question.

You need this dependency:

androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha05
Related