Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
back2dos opened this issue Jan 11, 2019 · 2 comments

Comments

@back2dos
Copy link
Member

//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>
')
@kLabz
Copy link
Contributor

kLabz commented Jan 11, 2019

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

@back2dos
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants