Basic React Example

Before moving forward, let's take a look at what a React.js component looks like:

class HelloWorld extends Component {
  render()
    return (
        <div>Hello {this.props.name}</div>    
        );
  }
};

ReactDOM.render(
    <Hello name="World" />,
    document.getElementById('container')
);

This will render out to be:

<section id='container'>
  Hello world
</section>

Now that you've seen this component, [turn and talk] with the person next to you and identify new abilities and attribute that you see.

results matching ""

    No results matching ""