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

Koin 4.0.0 with Wasm support #359

Merged
merged 2 commits into from
Oct 7, 2024
Merged

Koin 4.0.0 with Wasm support #359

merged 2 commits into from
Oct 7, 2024

Conversation

Shusshu
Copy link
Contributor

@Shusshu Shusshu commented Mar 7, 2024

Koin support WASM as of version 3.6.0 currently in alpha.

@DevSrSouza
Copy link
Collaborator

I think we should wait until Koin stable release, if someone wants to try Koin and Voyager.

Copying this two functions should be enough:

@Composable
public inline fun <reified T : ScreenModel> Screen.getScreenModel(
    qualifier: Qualifier? = null,
    noinline parameters: ParametersDefinition? = null
): T {
    val koin = getKoin()
    return rememberScreenModel(tag = qualifier?.value) { koin.get(qualifier, parameters) }
}

@Composable
public inline fun <reified T : ScreenModel> Navigator.getNavigatorScreenModel(
    qualifier: Qualifier? = null,
    noinline parameters: ParametersDefinition? = null
): T {
    val koin = getKoin()
    return rememberNavigatorScreenModel(tag = qualifier?.value) { koin.get(qualifier, parameters) }
}

@Shusshu Shusshu reopened this Jul 27, 2024
@Shusshu Shusshu changed the title Koin 3.6.0 Wasm support Koin 4.0.0 with Wasm support Jul 27, 2024
@DevSrSouza DevSrSouza merged commit a4861e4 into adrielcafe:main Oct 7, 2024
1 check failed
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.

2 participants