Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
DougBTX
on March 24, 2016
|
parent
|
context
|
favorite
| on:
Generalizing JSX: Delivering on the Dream of Curri...
Regarding the hack to make function calls: if JSX elements start with a capital letter, then the pragma is ignored, and the element name is used as a local variable name instead, e.g.:
transform("<Foo id = 'my-element'>hi!</Foo>")
outputs
Foo({id: "my-element"}, ["hi!"])
tolmasky
on March 24, 2016
[–]
Yeah, it was outside the scope of this blog post, but if you look at how its implemented here:
https://github.com/tolmasky/generic-jsx/blob/master/generic-...
you'll see it deals with both cases.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: