[英]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.