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

Better separate modules #28

Closed
marcellogalhardo opened this issue Apr 19, 2021 · 1 comment
Closed

Better separate modules #28

marcellogalhardo opened this issue Apr 19, 2021 · 1 comment
Assignees

Comments

@marcellogalhardo
Copy link
Owner

marcellogalhardo commented Apr 19, 2021

Now that I have a better understanding on Compose implementation of ViewModels, to prepare for release 1.0.0 I propose a new module structure:

  • core: vanilla functionalities. E.g., retain(viewModelStoreOwner, ...) {}.
  • activity: activity extension functions, without Compose support. E.g., Activity.retain {}.
  • activity-compose: activity extension functions, with Compose support. E.g., @Composable retainInActivity {}.
  • fragment: fragment extension functions, without Compose support. E.g., Fragment.retain {}.
  • fragment-compose: fragment extension functions, with Compose support. E.g., @Composable retainInFragment {}.
  • navigation: navigation dedicated functionalities. E.g., retain(navBackStackEntry) {}.
  • navigation-compose: navigation extension functions, with Compose support. E.g., @Composable retainInNavGraph {}.
  • navigation-fragment: navigation extension functions, with Fragment support. E.g., Fragment.retainInNavGraph(navId) {}

This new structure will guarantee that new applications that only are built only with Compose do not require transitive dependency on fragments or other Android components.

@marcellogalhardo
Copy link
Owner Author

Fixed on #35.

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

1 participant