In the React project, I want to be able to use div and canvas tags in {}, but this is not valid now

<div className={"break_down_div"}>
                {this.state.breakDown && this.state.breakDown.length != 0?
                    <canvas className={"blueCircle"} ></canvas>
                    <div
                    ref={(elem) => { this.element = elem; }}
                    style = {divStyle}
                    className={`${this.props.styleSet}`}
                    >
                    </div>
                    :
                }

            </div>

Feb.28,2021

put canvas and div under one node


  

component class can only contain one top-level tag, otherwise it will report an error and wrap canvas and div in tags

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c2762a-3385a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c2762a-3385a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?