Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add props to jsx element

var clonedElementWithMoreProps = React.cloneElement(
    this.mainContent, 
    { anotherMessage: "nice to meet ya!" }
);
// now render the new cloned element? //Deep Copy
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #props #jsx #element
ADD COMMENT
Topic
Name
1+2 =