More refactoring and porting to React

This commit is contained in:
Colin McLeod
2015-12-13 11:51:58 -08:00
parent 035f6b3efa
commit ab0019424f
58 changed files with 2243 additions and 2507 deletions

View File

@@ -8,12 +8,16 @@ export default class Page extends React.Component {
language: React.PropTypes.object.isRequired
};
static propTypes = {
currentMenu: React.PropTypes.any
};
constructor(props) {
super(props);
// Autobind private functions
Object.getOwnPropertyNames(this.constructor.prototype).forEach(prop => {
if(prop.charAt(0) == '_' && typeof this[prop] === "function") {
if(prop.charAt(0) == '_' && typeof this[prop] === 'function') {
this[prop] = this[prop].bind(this);
}
});