Esc & Return w/ Sean Timm

Playing with React Views

February 29, 2016

React is really pretty straightforward, but as I mentioned before, it’s easy to get bogged down in the swirl of the energy around it.

This post isn’t about any of that.  This post is about playing with React views.

Here’s our HTML:

<div id="root" />

Here’s our JavaScript:

class SimpleComponent extends React.Component {
  render() {
    return (
      <div className="simple">
        <h1>That's all there is to it!</h1>
React.render(<SimpleComponent />, document.getElementById('root'))

I skipped some details.  Maybe this doesn’t look like any JavaScript you’ve ever seen.  But you do know HTML.  Play around with the markup a bit!  Poke at the things you understand.  Try something with the parts you don’t.  Seriously!  Take a minute and just play in the sandbox below!

Interesting, right?  I’ll come back later with some details.  In the meantime, just have fun with it!  Feel free to comment below with what you discover!

Sean Timm

Ever the progressive contrarian, Sean stands for you against the forces that fear change. His present passion is firmly focused on leading the charge in modernizing front-end development practices, and he wants you to join the fight. Engage with Sean on Twitter