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

update to compose 1.7 #384

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

update to compose 1.7 #384

wants to merge 13 commits into from

Conversation

Tlaster
Copy link
Owner

@Tlaster Tlaster commented Sep 30, 2024

No description provided.

val stateHolder = currentLocalStateHolder
return stateHolder.getOrPut("${name}Navigator") {
fun rememberNavigator(key: String? = null): Navigator {
val viewModel = viewModel<NavigatorViewModel>(key = key)
Copy link
Contributor

@artsmvch artsmvch Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails on iOS with the following error:

Uncaught Kotlin exception: kotlin.UnsupportedOperationException: `Factory.create(String, CreationExtras)` is not implemented. You may need to override the method and provide a custom implementation. Note that using `Factory.create(String)` is not supported and considered an error.

You need to provide a factory, something like this should work:

val viewModel = viewModel<NavigatorViewModel>(key = key) {
    NavigatorViewModel()
}

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.

3 participants