【发布时间】:2018-07-31 13:27:02
【问题描述】:
我是原生反应的新手。
在我的项目中实现 native-base 后,我收到此错误:
这是我的代码:
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import {Header,Left,Right,Icon} from 'native-base'
export default class DiningAreas extends Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
return (
<View>
<Header>
<Left Icon = 'menu'/>
</Header>
<Text> DiningAreas </Text>
</View>
);
}
}
【问题讨论】:
-
您是否尝试过他们在错误中提到的内容?
-
是的,我试过但不幸遇到同样的问题
-
您使用的是最新版本的 native-base 吗?
-
@Johan 我正在使用最新版本
-
watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache 应该可以解决问题,这是随机发生的,所以无法重现。最后一个选项是在 node_modules 中安装 create-react-class