我不确定我做错了什么,但我有以下组件
import React, {PropTypes} from 'react';
import { Icon } from 'react-native-elements';
const propTypes = {
selected: PropTypes.bool,
name: PropTypes.string,
};
const TabIcon = (props) => {
return <Icon name={props.name} size={28} type={"font-awesome"} />
};
TabIcon.propTypes = propTypes;
export default TabIcon;
然后是以下
<Scene key='Home' component={Home} title='Home' initial={true} icon={TabIcon({name:'home'})} />
我一直得到TypeError:将循环结构转换为JSON“