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
// PLEASE, READ | |
// | |
// This is a way to scope ViewModels to the Composition. | |
// However, this doesn't survive configuration changes or procress death on its own. | |
// You can handle all config changes in compose by making the activity handle those in the Manifest file | |
// e.g. android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"> | |
// | |
// This is just an exploration to see what's possible in Compose. We don't encourage developers to copy-paste | |
// this code if they don't fully understand the implications of it and if this actually solves the use case to solve. |