Navigation Component prevent to recreate fragment on back press
Of course, we can not prevent calling oncrateView, but there is a simple way. Instead of calling view.loadData() in onCreateView or other lifecycle methods we can call it while initializing ViewModel this article helped me to know ViewModel better 5 common mistakes when using Architecture Components Update: The current navigation component (V 2.3.0) doesn’t support … Read more