SHARE
TWEET

fgfgf

a guest Sep 16th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. class Header extends React.Component {
  3.   constructor(props) {
  4.     super(props);
  5.     this.state = { favoritecolor: "red" };
  6.   }
  7.   render() {
  8.     return (
  9.       <h1>My Favorite Color is {this.state.favoritecolor}</h1>
  10.     );
  11.   }
  12. }
  13.  
  14. ReactDOM.render(<Header />, document.getElementById('root'));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top