Why use "Composable" annotation for a function that doesn't describe the UI ? #778
Unanswered
florian-mlr
asked this question in
Q&A
Replies: 2 comments
-
It's not necessary. I think they were left unintentionally. |
Beta Was this translation helpful? Give feedback.
0 replies
-
In general, it's recommended to follow standard conventions and best practices when using annotations. If you're not working with Jetpack Compose or UI-related code, it's best to omit the @composable annotation to avoid confusion and make your codebase more maintainable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In this project, I notice some functions that are not intended to describe the UI or not retaining the state like the following one :
What is the point of the Compose annotation in this case ? Is it a "good practice" ?
Beta Was this translation helpful? Give feedback.
All reactions