Skip to content
Discussion options

You must be logged in to vote

The decompose-dagger-sample example doesn't follow the api/impl structure. In that example, both feature-root and app-android can see all feature component interfaces, implementation classes and Composable functions.

If you want to follow the api/impl structure, then unfortunately, Composable top-level functions can't have a separate API module. You'd need a workaround for it. From the top of my head, there are two options, each with their own pros and cons:

  1. Include Composable functions in the Component interfaces.
interface FeatureAComponent {
    val state: StateFlow<FeatureAState>

    @Composable
    fun Content()
}

Pros: feature impl modules only depend on child api modules and do …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by styagailo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants