找不到变量:React Native的react-native-material-bottom-navigation中的选项卡

时间:2018-07-14 19:26:43

标签: reactjs react-native

我为我的项目准备了react-native-material-bottom-navigation库(顺便说一句,是空白的)。我逐行使用了与https://github.com/timomeh/react-native-material-bottom-navigation中的示例完全相同的代码,但是出现以下错误:

ReferenceError: Can't find variable: tab

 This error is located at:
   in FullTab (at App.js:53)
   in TouchableWithoutFeedback (at TabList.js:165)
   in RCTView (at View.js:43)
   in TabList (at BottomNavigation.js:134)
   in PressFeedback (at BottomNavigation.js:132)
   in BackgroundDecorator (at BottomNavigation.js:130)
   in RCTView (at View.js:43)
   ...

第53行的代码是

 <FullTab
  isActive={isActive}
  key={tab.key}
  label={tab.label}
  renderIcon={this.renderIcon(tab.icon)}
/>

为什么会出现此错误?

0 个答案:

没有答案