private val nimbus = Nimbus(
baseUrl = BASE_URL,
components = customComponents,
logger = AppLogger(),
errorView = { throwable: Throwable, retry: () -> Unit ->
CustomError(throwable = throwable, retry = retry)
}
)
val globalState = nimbus.globalState // Access global state
UI layer must provide nimbus with ProvideNimbus to the ui tree
AppTheme {
// A surface container using the 'background' color from the theme
Surface(color = MaterialTheme.colors.background) {
Column {
ProvideNimbus(nimbus) {
NimbusNavigator(viewRequest = ViewRequest("/present.json"))
Usage: Initializes nimbus
UI layer must provide nimbus with ProvideNimbus to the ui tree