Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Initial Reactions ToReact Written in React
import React from 'react';
import ReactDom from 'react-dom';
class FirstImpressions extends React.Component {
const impressionComponents = this._getImpressions();
render() {
<h1>I am JSX</h1>
<p className="a_css_class_name">
<h3>3 Impressions</h3>
{impressionComponents} // arrays can be passed!
class Impression extends React.Component {
render() {
<p className="author">{}<p/>
<p className={`body anotherCssClass ${this.props.sentiment}`}>
// non react functions have underscore prepended convention
const impressions = [
{ id: 1, body: 'Interpolation is neat in React!', sentiment: 'positive' },
{ id: 2, body: 'Jsx syntaxt is hard to read', sentiment: 'negative' }
return => {
return (
<Impression body={impression.body} key={} sentiment={impression.sentiment} author='yonatan'/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment