If you've built a couple of React Native apps, the following probably feels familiar. You start with a colors.ts file and a simple Button component. Everything looks fine at first. Then the design changes a few times, and that small color file starts growing. Your Button also picks up another prop every time someone asks for a slightly different style.
The setup works at first, but after a few design changes, even a small update can mean checking several files across the project.
Here's what a typical color file looks like after a while:
export const colors = { primary: '#6e4836', primaryPressed: '#5a3a2b', textPrimary: '#261d16', textSecondary: '#72665e', // and forty more };
And here's what a typical Button looks like after a few redesigns:
<Button variant="primary" size="md" fullWidth loading={busy} containerStyle={styles.checkoutButton} labelStyle={styles.checkoutLabel} />
These are simplified examples, but you get the idea.…