React native props TypeError:将循环结构转换为JSON

时间:2017-07-10 10:34:43

标签: reactjs react-native

我不确定我做错了什么,但我有以下组件

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“

0 个答案:

没有答案