How does react render the react element generated by React.cloneElement () into a real dom, and mount it to a specified location

problem description

Editor written with react, now I need to copy the dom of a component (such as photo album, carousel.), including its sub-components. My current practice is to get the react element, of this component and then use React.cloneElement () to generate new elements. At this stage, I don"t know how to go on, novices don"t know how to render react elements to the specified dom?

Dec.24,2021


cloneElement(element, config, children)

takes three parameters, just like createElement , and the last return is the ReactElement react element.
so the usage is the same as createElement . All through render (ReactElement, target location)

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-1e48daa-4422c.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-1e48daa-4422c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?