Skip to content

Instantly share code, notes, and snippets.

@sparrow
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.
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