I am using Symfony2 Framework. For view part, I am using Reactjs. Since, twig also uses '{{' and '}}', So to use '{{' in twig , I am doing following:
<div {{'dangerouslySetInnerHTML={{__html: this.props.html}}'}}></div>
and
<div style={{'{{width:10}}'}}
When I try to transform this jsx into js, I get error wherever I have used braces for twig. How to transform a jsx code having twig variables and twig braces into JS?
EDIT: here is the twigfiddle . If I try to transform this code to js using JSX compiler , then I get error: Error: Parse Error: Line 4: Unexpected token %