Reactjs 反应不当。可能是功能组件(?)

Reactjs 反应不当。可能是功能组件(?),reactjs,ecmascript-6,components,jsx,react-component,Reactjs,Ecmascript 6,Components,Jsx,React Component,我的部件工作正常,但我的问题是建筑。有没有一个特殊的装载机,我需要使这项工作 我有一个这样的函数组件,它使用一个名为的组件。此组件来自npm模块。文档中说我应该添加一个像tabsContent这样的对象作为 constparentcomponent=()=>{ 常数tabsData=[ {title:'One title'键:'firstKey'}, {title:'other title',key:'secondKey'}, ]; 常量选项卡内容={ 第一个键:()=>, 第二个键:()=>,

我的部件工作正常,但我的问题是建筑。有没有一个特殊的装载机,我需要使这项工作

我有一个这样的函数组件,它使用一个名为
的组件。此组件
来自npm模块。文档中说我应该添加一个像tabsContent这样的对象作为

constparentcomponent=()=>{
常数tabsData=[
{title:'One title'键:'firstKey'},
{title:'other title',key:'secondKey'},
];
常量选项卡内容={
第一个键:()=>,
第二个键:()=>,,
};
返回(
{tabsContent}
);
}
当我有这些
时,构建给了我一个错误,这也是finction组件,但是当我与常规
交换这些组件时,它会工作。有什么原因吗?代码正在按预期运行。我从构建中得到的错误如下:

| var ParentComponent = function ParentComponent((_temp2 = (_temp = _ref, _ref3 = <FirstCompoent></FirstCompoent>, _temp), _ref4 = <SecondCompoent></SecondCompoent>, _tem
p2)) {
|   var _temp, _ref3, _temp2, _ref4;
| var ParentComponent=函数ParentComponent(_temp2=(_temp=_ref,_ref3=,_temp),_ref4=,_tem
p2)){
|变量温度,参考3,参考2,参考4;

如果我理解正确,
tabsContent
不是有效的子对象,它是一个对象。要渲染组件,必须返回有效的渲染组件,如
{tabsContent.firstKey}
是的,这是正确的。我忘了告诉你们,这是一个以tabsContent形式作为孩子的组件。我只是使用一个finish组件,文档中说我应该有一个像tabsContent这样的对象作为孩子。对此我很抱歉。我把它添加到了我的问题中。你能定义“不工作”吗?@DanO,我试图重新格式化自己。我说的“不工作”是指生成给了我问题中的错误消息。请更具体地说,并分享错误是什么。你能否也分享你的
ParentComponent
代码的全部内容,以便更容易地知道你要导入的是什么“tabs”组件?
| var ParentComponent = function ParentComponent((_temp2 = (_temp = _ref, _ref3 = <FirstCompoent></FirstCompoent>, _temp), _ref4 = <SecondCompoent></SecondCompoent>, _tem
p2)) {
|   var _temp, _ref3, _temp2, _ref4;