Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample app to demonstrate integration of Koin with MvRx #432

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

friendoye
Copy link

Inspired by #339.

This PR adds a new sample app, which showcases usage of Koin with MvRx. In this app custom KoinMvRxViewModelFactory was introduced, which delegates creation of specific ViewModel directly to Koin, rather than fetching each constructor parameter manually. Also, this sample, in many ways, is very similar to Dagger sample app.

Finally, this PR addresses such issue as usage of custom Koin scopes during creation of ViewModel in MvRxViewModelFactory. Because there might be a situation in Koin, when ViewModel's factory is tied to specific scope, there should be a way for MvRxViewModelFactory to know, which scope should be used during creation. That's why customData property was introduced in ViewModelContext.

Curious to hear WDYT about this PR!

@friendoye friendoye changed the title Add a sample app to demonstrate integration of Koin with MvRx Add sample app to demonstrate integration of Koin with MvRx Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant