i experiencing problem htmltojsx converter (npm: htmltojsx), same converter officially displayed on https://facebook.github.io/react/html-jsx.html.
the html-code <div>{</div>
compiled following jsx-code:
<div>{</div>
the jsx code fails following error:
uncaught syntaxerror: embedded: unexpected token (7:18) 5 | var hello = react.createclass({ 6 | render: function() { > 7 | return <div>{</div>; | ^ 8 | } 9 | });
test: https://jsfiddle.net/69z2wepo/28714/
does know solution problem?
in jsx curly brackets used wrap javascript expressions. can display bracket this:
return <div>{'{'}</div>;
Comments
Post a Comment