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?

Source by devarama.com #
 
PREVIOUS NEXT
Tagged: #add #props #jsx #element
ADD COMMENT
Topic
Name
9+5 =