Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 535 Bytes

STYLEGUIDE.md

File metadata and controls

33 lines (22 loc) · 535 Bytes

React Style Guide

Under development and up for discussion

Routing

TODO

Creating React Classes

Prefer the newer es6 class syntax over es5 createClass syntax

// good
class Table extends React.Component {...}

// bad
const Table =  React.createClass({...});

PropTypes

Always use PropTypes when creating a React class. It's like a poor mans Typescript.

// good
class Table extends React.Component {...}

Table.PropTypes = {
  selectedRows: React.PropTypes.array,
  beAwesome: React.PropTypes.bool
}