Basic React ES6 Class Example

Sometimes it’s the super easy stuff I forget how to do.

It’s really straightforward to create a WebStorm Live Template for a React ES6 Class template.

But when you’re first starting to learn things like this, I find just repeatadly typing it out every time I want to make a new React ES6 class really helps grind it into my memory:

import React from 'react';

class YourClassNameHere extends React.component {

  render() {
    return (
      <div className="yourCssClassName">

      </div>
    );
  }

}

YourClassNameHere.propTypes = {
  pair: React.PropTypes.array.isRequired
};

export default YourClassNameHere;

Published by

Code Review

CodeReviewVideos is a video training site helping software developers learn Symfony faster and easier.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.