Last active
October 13, 2021 12:17
-
-
Save burnoo/07db5d86215d2476e39896bb8285cfa9 to your computer and use it in GitHub Desktop.
Cokoin Medium 2
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
val appModule = module { | |
single { AppData() } | |
} | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContent { | |
Koin(appDeclaration = { modules(appModule) }) { | |
val appData = get<AppData>() | |
App(appData) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment