Last active
March 9, 2017 07:08
This is a JSX code snippet that we used for our blog post https://rubygarage.org/blog/the-angular-2-vs-react-contest-only-livens-up at RubyGarage. The code shows how to create a React component.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NewComponent extends React.Component { | |
render() { | |
return( | |
<div className="wrapper"> | |
<h1 className="title">This is My { this.state.component }</h1> | |
<p className="description">This component is a React component.</p> | |
</div> | |
) | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment