facebook / jsx

The JSX specification is a XML-like syntax extension to ECMAScript.

Home Page:http://facebook.github.io/jsx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Declarative complex attribute values

borela opened this issue · comments

Sorry if this has been sugested before; Other markup languages like XAML allows attribute values to be expanded:

<Complex 
  someAttribute={
    <SubComponent>Some text value...</SubComponent>
  }
>
  Some children...
</Complex>

Would turn into something like this:

<Complex>
  <Complex@someAttribute>
    <SubComponent>Some text value...</SubComponent>
  <Complex@someAttribute>
  Some children...
</Complex>

The <Complex@someAttribute> would just affect the attribute's value; The symbol @ was chosen for demonstration purposes only but it could be anything else.