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

Support for Google's Viewmodel which recently went multi-platform #289

Open
kawaiiDango opened this issue Mar 22, 2024 · 5 comments
Open

Comments

@kawaiiDango
Copy link

kawaiiDango commented Mar 22, 2024

(Feature request)

According to https://issuetracker.google.com/issues/214568825 viewmodel is now multi-platform. It would be nice to have support for that if possible.

Edit, looks like viewmodel-compose isn't, yet. It can be tracked here https://issuetracker.google.com/issues/330323282

@Tlaster
Copy link
Owner

Tlaster commented Mar 23, 2024

With the recent release of multiplatform support for Jetpack Lifecycle and ViewModel, I think we can expect Jetpack Navigation Compose to be multiplatform, which can be tracked here https://issuetracker.google.com/issues/281774647.
My initial thought is that we can migrate PreCompose's Lifecycle and ViewModel to Jetpack's implementation and deprecate the current implementation, but I haven't decided yet.

@Sanlorng
Copy link

Sanlorng commented Apr 8, 2024

With the recent release of multiplatform support for Jetpack Lifecycle and ViewModel, I think we can expect Jetpack Navigation Compose to be multiplatform, which can be tracked here https://issuetracker.google.com/issues/281774647. My initial thought is that we can migrate PreCompose's Lifecycle and ViewModel to Jetpack's implementation and deprecate the current implementation, but I haven't decided yet.

See Jetbrains branch
Navigation Multiplatform
Lifecycle Multiplatform
ViewModel Multiplatform
Maven Repository

@ColtonIdle
Copy link

My initial thought is that we can migrate PreCompose's Lifecycle and ViewModel to Jetpack's implementation and deprecate the current implementation

That makes sense to me. Is there a benefit to not doing that?

@Tlaster
Copy link
Owner

Tlaster commented May 9, 2024

My initial thought is that we can migrate PreCompose's Lifecycle and ViewModel to Jetpack's implementation and deprecate the current implementation

That makes sense to me. Is there a benefit to not doing that?

I think using Jetpack's Lifecycle and ViewModel is the best solution, but since the official Navigation is coming, I starting to think about maybe PreCompose have done its job.

@Sanlorng
Copy link

Sanlorng commented May 9, 2024

My initial thought is that we can migrate PreCompose's Lifecycle and ViewModel to Jetpack's implementation and deprecate the current implementation

That makes sense to me. Is there a benefit to not doing that?

I think using Jetpack's Lifecycle and ViewModel is the best solution, but since the official Navigation is coming, I starting to think about maybe PreCompose have done its job.

But for now,Navigation Multiplatform does not support BackHandle and NavigateForResult API

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

No branches or pull requests

4 participants