-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Created koin-decompose module #2062
base: 4.1.0
Are you sure you want to change the base?
Created koin-decompose module #2062
Conversation
Interesting. Do you have a minimal sample app you add in ./example? |
@arnaudgiuliani hi! tried to add but it seems to be pretty hard since the module is not published. it's located in the other Gradle project (projects vs examples), so to add it I have to add a big amount of boilerplate code just to build the project. maybe there's a way to publish a snapshot of the module? it would make the work much easier I suppose |
can you add documentation on your classes? |
@arnaudgiuliani done |
We could tag @KoinExperimentalApi time to get some feedback from other users. Also to help come back on some API if needed |
/** | ||
* Decompose Component that can handle a Koin Scope | ||
*/ | ||
interface DecomposeScopeComponent : KoinScopeComponent, ComponentContext { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag it as experimental with @KoinExperimentalApi
/** | ||
* Provide scope tied to Component | ||
*/ | ||
fun DecomposeScopeComponent.componentScope() = lazy { createComponentScope() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag it as experimental with @KoinExperimentalApi
* Create Scope for Component. | ||
* Doesn't link to parent component's Scope | ||
*/ | ||
fun DecomposeScopeComponent.createComponentScope() = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag it as experimental with @KoinExperimentalApi
do you have a demo/sample application with such API somewhere? |
is it ok if I'll create the sample with the copy of the module inside? |
can be something we put as getting-started example also. Depends how complex is it. But then if it's core repo, we will need to maintain it over versions |
ok, I suggest the following plan - I'll create the separate repository with the example and module implementation inside. after the koin-decompose module will be published I'll create the PR inside the core repo and use the remote artefact. is this plan ok for you? |
No description provided.