Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react extends component this.props

class App extends React.Component {

render() {
  return (
  <>
      <h1>{this.props.headerProps}</h1>
      <h2>{this.props.contentProps}</h2>
      </>
    );
}
}
ReactDOM.render(
<App headerProps = "Header Props" contentProps="Content PROPS"/>,
document.getElementById ('mountNode'));


Source by jscomplete.com #
 
PREVIOUS NEXT
Tagged: #react #extends #component
ADD COMMENT
Topic
Name
1+3 =