Do we have a way to scope ViewModel to a Pager usi...
# compose-android
p
Do we have a way to scope ViewModel to a Pager using “navigation-compose” or any other library?
Using “navigation-compose” i did try to create a new Host for every Pager in my HorizontalPager , But that also dosen’t seem to clear the viewmodel when it goes off the screen and if i swipe 20 pages i will have 20 Viewmodel alive
v
I'm not sure about this, but maybe this will help you? https://github.com/sebaslogen/resaca
p
I know about this , I also have used a similar approach in this library but without config change. Looking for a simpler solution