[英]react-native app ios native-base issue in redux app
import { NativeBaseProvider, useTheme } from 'native-base'
function AppRedux () {
// not sure where you are getting this modified value from
const modified = true
const { colors } = useTheme()
return !modified ? (
<View style={{ backgroundColor: '#000' }} />
) : (
<View style={{ backgroundColor: colors.primary }} />
)
}
export default function App() {
return (
<NativeBaseProvider>
<Provider store={store}>
<AppRedux />
</Provider>
</NativeBaseProvider>
);
}
来自native-base
的useTheme
官方文档在这里: https://docs.nativebase.io/theme
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.