我不能推动TabBarIOS。下面的代码呈现“未处理的JS异常:TypeError:无法读取未定义的属性'Item'”
我的依赖关系很小
“ react”:“ 16.8.3”,
“ react-native”:“ 0.59.1”
import React, { Component } from 'react';
import {
TabBarIOS,
View,
Text
} from 'react-native';
export default class HomeScreen extends Component {
constructor(props) {
super(props);
this.state = {
tab: 'newsFeed'
};
}
render() {
return (
<TabBarIOS>
<TabBarIOS.Item
systemIcon={'featured'}
selected={this.state.tab === 'newsFeed'}
onPress={() => this.setState({ tab: 'newsFeed' })}
>
<Text>Hello</Text>
</TabBarIOS.Item>
</TabBarIOS>
);
}
}