Aug 4, 2023
A preview at that level isn't convenient as it's not flexible to fake the factory and viewmodel.
Instead you can go a level lower and have an inner composable that only accepts pure data/functions.
See here for example:
https://gist.github.com/CostaFot/1d3ddf1eb6674a7ab738c4fe8d8995c4#file-mainscreen-kt
`MainContent` is the part that is easily previewed, while `MainScreen` is the top level that sets up the viewmodel/factory etc.