What is the recommended way to handle common strin...
# compose
k
What is the recommended way to handle common strings and dimensions? Should we store them inside .xml or should we have them as global variables?
s
It’s still Android, all of these have a reason to exist like strings and how they make having the app in different languages easy. Global variables sounds like you’d be re-inventing the wheel when you need to solve those same problems.
1
y
I agree 100%, but it's interesting to think through what this looks like for Compose multi platform? Is there any natural abstraction for this?
s
Having the composables still receive the text as strings but resolving it higher up in a platform-specific place is the first thing that comes to mind. Otherwise not aware of any library that abstracts this out.
👍🏻 2