Replies: 2 comments
-
Currently. there is no specific callback for this case. If |
Beta Was this translation helpful? Give feedback.
-
Wdym I didn't get you. Init should work basically the same way within ViewModels as with Components? onViewCreated will be invoked because the corresponding fragment's view will be destroyed, but not the view model (or component in this case) |
Beta Was this translation helpful? Give feedback.
-
Hello.
In Android viewmodel and Fragments i have onViewCreated so when I navigate to fragment it calls onViewCreated and I can make some initializations inside viewmodel's init {}
But in Decompose init of a component is called only on first navigation to the corresponding screen.
After that I can only use doOnStart() but it's not the same.
Is there a way detect that I just navigated to the component?
Beta Was this translation helpful? Give feedback.
All reactions