簡體   English   中英

react-native 應用程序 ios redux 應用程序中的本機基礎問題

[英]react-native app ios native-base issue in redux app

大家好,我正在使用 redux、react-native cli 創建反應原生應用程序,並且在啟動應用程序時出現一些問題,它顯示為屏幕截圖,我看到在線解決方案提到添加如下

 <NativeBaseProvider>
       <Example/>
    </NativeBaseProvider>

問題是我正在使用 redux 所以當我像這樣使用另一個 redux 問題時彈出。 還有另一種解決方案,我嘗試取消鏈接本機基礎,然后刪除然后安裝,然后也出現問題。任何人都可以建議我一個解決方案來弄清楚發生了什么並且可以請教解決方法嗎?

在此處輸入圖像描述


當我使用 NativeBaseProvider 時出現此錯誤

在此處輸入圖像描述

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-baseuseTheme官方文檔在這里: https://docs.nativebase.io/theme

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM