Hello World Android app which takes the 'hello world' text from the ViewModel and shows in composable

Viewed 39

I am creating a sample Android app.

I would just like to have a MainActivity which shows a 'Hello World' composable.

It should retrieve the "Hello World" text from a ViewModel.

Main issue I am having is how to use the ViewModel in MainActivity.

I would like to do this without the use of Dagger/Hilt.

How can I do this?

0 Answers
Related