https://kotlinlang.org logo
#decompose
Title
# decompose
e

Eugen Martynov

12/02/2023, 9:47 PM
mm, getting
NotOnMainThreadException
on Android, just calling navigate from compose function
Component created outside of the setContent
a

Arkadii Ivanov

12/02/2023, 10:04 PM
Yep, this is not a crash, just an error message indicating that you are performing the navigation on a wrong thread. See https://github.com/arkivanov/Decompose/issues/490#issuecomment-1741859357
e

Eugen Martynov

12/02/2023, 10:05 PM
Thanks, it looks like not a problem 🙂
Checking further
Watched video and tried to resume my Decompose jorney
Works!
I just forgot to subscribe to child stack changes
Super great, tomorrow I will write some base component that will have some coroutines scope based on lifecycle
And that would be some equivalent of Android view model
Super thank you for the reply!
a

Arkadii Ivanov

12/02/2023, 10:21 PM
Yay! 🔥