tink_hxx icon indicating copy to clipboard operation
tink_hxx copied to clipboard

If children are a function, it should be roughly treated as complex attribute function

Open back2dos opened this issue 6 years ago • 2 comments

//Given:
function list<T>(attr:{items:Array<T>, children:T->Children}) '
  <ul>
    <for {item in attr.items}>
      <li key={item}>{...attr.children(item)}</li>
     </for>
  </ul>
'; 
//should compile:
hxx('
  <list items={[ { name: "Alice" }, { name: "Bob" } ]}>
    <h3>{name}</h3>
  </list>
')

back2dos avatar Jan 11 '19 08:01 back2dos

Would that have any impact on the code haxe-react is using from tink_hxx?

kLabz avatar Jan 11 '19 08:01 kLabz

Nope, this is purely a generator thing, that haxe-react is not using ;)

back2dos avatar Jan 11 '19 09:01 back2dos