I want to do this:
const { colors as ThemeColors } = useTheme();
but I can't... and I don't want do this:
const { colors } = useTheme();
const ThemeColors = colors;
Do you know a way to do it ?
I want to do this:
const { colors as ThemeColors } = useTheme();
but I can't... and I don't want do this:
const { colors } = useTheme();
const ThemeColors = colors;
Do you know a way to do it ?
You can do something like this to create an alias (I don't know why it is called an alias, because for me alias is copied by reference):
const { colors: ThemeColors } = useTheme();
However, this is not copied by reference but as value. That means changing ThemeColors
will not change colors
.