Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add props to jsx element

function AddExtraProps(Component, extraProps) {
    return <Component.type {...Component.props} {...extraProps} />;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #props #jsx #element
ADD COMMENT
Topic
Name
6+4 =