Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 在函数内创建多行jsx_Reactjs_Jsx - Fatal编程技术网

Reactjs 在函数内创建多行jsx

Reactjs 在函数内创建多行jsx,reactjs,jsx,Reactjs,Jsx,我正在尝试创建一个多行jsx变量 returnedElem = <StyledRemovedAnnotationDiv> <p>{this.state.deletedAnnotation.objectRemoved.prediction}</p> <button className="btn btn-danger" onClick={() => this.undoDelete(tax, del

我正在尝试创建一个多行jsx变量

returnedElem = <StyledRemovedAnnotationDiv>
      <p>{this.state.deletedAnnotation.objectRemoved.prediction}</p>
      <button
        className="btn btn-danger"
        onClick={() => this.undoDelete(tax, deletedObj)}
      >
        Undo
      </button>
    </StyledRemovedAnnotationDiv>,
returnedElem=
{this.state.deletedAnnotation.objectRemoved.prediction}

this.undodele(tax,deletedObj)} > 撤消 ,

但这是行不通的。请引导我。

尝试用大括号包装:

returnedElem=(
{this.state.deletedAnnotation.objectRemoved.prediction}

this.undodele(tax,deletedObj)} > 撤消
)
什么类型的组件是
StyledRemovedAnnotationDiv
?你不会传递任何道具吧?你不工作是什么意思?
undodele
函数的作用是什么?