Naming convention (remember) #127
Replies: 4 comments 1 reply
-
| Thanks for the idea. But it doesn't return a mutable object. Perhaps something like  | 
Beta Was this translation helpful? Give feedback.
-
| Filed #128 | 
Beta Was this translation helpful? Give feedback.
-
| Hey 👋 According to Jetpack Compose’s naming conventions, any @composable factory function that uses remember {} internally and returns a mutable object should be prefixed with remember. ✅ Follows Compose conventions ✅ Makes the function’s behavior more obvious to developers using it Here’s the link to the function in question for quick reference: Happy to help with a PR if needed! | 
Beta Was this translation helpful? Give feedback.
-
| Hey 👋 Thanks for the clarification! You're absolutely right — I hadn't noticed that the function has since been renamed to  I'll make sure to check the latest state of the repo next time before referencing a path 😅 Thanks again for pointing that out and for maintaining such a valuable tool for the Compose ecosystem! Cheers ✌️ | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Function
asStateshould be renamed torememberAsStatehttps://github.com/arkivanov/Decompose/blob/master/extensions-compose-jetbrains/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/jetbrains/ValueComposable.kt#L12
Acording to Compose's naming conventions:
prefix any @Composable factory function that internally remember {}s and returns a mutable object with the prefix remember.Deatils
Beta Was this translation helpful? Give feedback.
All reactions