最佳答案
我是 React 的新手,我了解基于组件的内联样式的好处。但我想知道是否有一种体面的方式来拥有某种全球化的风格。例如,我希望在我的应用程序中使用相同的文本和按钮颜色。
我最初的想法是在自己的文件中创建一个“基本”StyleSheet 类,然后将其导入到我的组件中,而不是在每个组件中重复执行(如果需要,随后还必须在 x 个位置进行更改)。
有没有更好的“反应”方式?