haroldadmin / Vector

Kotlin Coroutines based MVI architecture library for Android
https://haroldadmin.github.io/Vector/
Apache License 2.0
193 stars 9 forks source link

Add navGraphViewModel delegate support #27

Open haroldadmin opened 4 years ago

haroldadmin commented 4 years ago

Is your feature request related to a problem? Please describe. The Navigation Architecture Component supports scoping ViewModels to a Navigation Graph. These ViewModels can be instantiated using by navGraphViewModels(<nav-graph-id>) delegate. Add support for this delegate to Vector too.

Describe the solution you'd like Add a separate vector-nav-ext module and add support for this delegate in there.

Describe alternatives you've considered A completely custom solution to allow scoping ViewModels to an arbitrary scope, but this will take a lot of time to implement.