in jsx, html entities without surrounding text produce bad JS
HTML entities work if interspersed in plain text. Ex:
return <div className="padlock-locked-bg graphic-cell">test test</div>;
becomes
return React.DOM.div( {className:"padlock-locked-bg graphic-cell"}, "test test");
... where the space in the middle is a genuine nbsp
Often a non-breaking space is used to style the background of an element without it collapsing. This does not work in react currently.
return <div className="padlock-locked-bg graphic-cell"> </div>;
becomes
return React.DOM.div( {className:"padlock-locked-bg graphic-cell"} );
... and does not parse
I believe this works correctly in 0.9 -- can you confirm? You can also try at http://facebook.github.io/react/jsx-compiler.html.
Indeed, you are right. I was using 0.9.0 in the browser but my copy of gulp-react was stale. Sorry about that Ben.
No problem, glad you figured it out!