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

Add experimental retained-compose artefact #76

Merged
merged 16 commits into from Dec 16, 2022
Merged

Conversation

marcellogalhardo
Copy link
Owner

First interation for built-in compose support. Usage looks like the following:

 @Composable
 fun MyComposable() {
     val vm = retain { ViewModel() }
 }
 
class ViewModel(val name: String = "")

The new Lifecycle 2.5.0 also allows us to improve the original design for retained-core (public API won't change), but those improvements will be handled in a separate PR.

Fixes #62

@marcellogalhardo marcellogalhardo marked this pull request as ready for review July 8, 2022 16:17
@marcellogalhardo marcellogalhardo merged commit c53b868 into master Dec 16, 2022
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.

Add first class support to Compose
1 participant