Merge pull request #698 from vjeux/fix_compiler

Fix html-jsx compiler
This commit is contained in:
Christopher Chedeau
2013-12-23 09:31:19 -08:00

View File

@@ -57,10 +57,18 @@ var ReactPlayground = React.createClass({
propTypes: {
codeText: React.PropTypes.string.isRequired,
transformer: React.PropTypes.func.isRequired,
transformer: React.PropTypes.func,
renderCode: React.PropTypes.bool,
},
getDefaultProps: function() {
return {
transformer: function(code) {
return JSXTransformer.transform(code).code;
}
};
},
getInitialState: function() {
return {mode: this.MODES.XJS, code: this.props.codeText};
},