我有这样的代码格式如下:createClass到组件类阵营转换
const Test = React.createClass({
tabIcons: [],
propTypes: {
...
},
render() {
return
<View> ...</View>
}
})
我不知道如何将tabIcons转换成新的格式
class Test extends Component {
static propTypes = {
...
}
render() {
return (
<View> ...</View>
)
}
}
你可以做'tabIcons = []'像你proptypes – Li357