Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react extends component with style

class App extends React.Component {
  render() {
 
    const ulStyle = {border: '2px solid green', width:'40%', listStyleType:'none'}
    const liStyle = {color : 'blue', fontSize:'23px'}
  return(
  <> 
      <h1 style={ulStyle}>HEADER</h1>
      <h2 style={ulStyle}>CONTENT</h2>
      <p style={liStyle}>This is container</p>
      </>
  );
  }
}
ReactDOM.render(<App />, document.getElementById('mountNode'));
Source by jscomplete.com #
 
PREVIOUS NEXT
Tagged: #react #extends #component #style
ADD COMMENT
Topic
Name
5+8 =