Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could you please try to be a bit more substantive with your comments?

E.g., Why do you think JSX is the best? What limitations did you hit with those other template languages?



Most template languages can't do something like that:

  // data
  const numbered = true // or false
  const strings = ["a", "b", "c"]

  // render
  const items = strings.map(i => <li key={i}>Item {i}</li>)

  if (numbered)
    return (<ol>{items}</ol>)
  else
    return (<ul>{items}</ul>)


Marko can! It's "define" tag lets you create reusable templates in your reusable templates.

https://markojs.com/docs/reference/core-tag#define


RippleJS is doing the same sort of thing, but better IMO




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: