【发布时间】:2022-11-05 15:26:44
【问题描述】:
在 react-native 中,使用如下动态样式:
const myComponent = () => {
const styles = createStyles(theme)
return (
<View style={styles.container}>
</View>
)
}
const createStyles = theme => StyleSheet.create({
container: {
backgroundColor: theme.background,
},
})
我如何避免从 react-native/no-unused-styles 收到 eslint 警告?
【问题讨论】:
-
有什么解决办法吗?...
标签: react-native eslint