hyperapp: onCreate doesn't work, but onClick does
When using JSX
:
onCreate
doesn’t work. oncreate
works.
onClick
and onclick
both work.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 20 (10 by maintainers)
Commits related to this issue
- Don't createElement from null/bool child nodes. Fix #94. Fix #95. — committed to jorgebucaran/hyperapp by jojibucaran 7 years ago
- Skip undefined/bool children and allow onClick, onCreate, etc. event names. * Don't createElement from null/bool child nodes. Fix #94. Fix #95. * Allow events to be written in camelCase. * Support op... — committed to jorgebucaran/hyperapp by jorgebucaran 7 years ago
@dodekeract Correct. Actually, I am not so happy about onEvent like names. It’s not consistent with the DOM API. The reason is there is for “so-called” React component support, but then again what other things does React do we don’t support (and will likely not to).
I recommend you use onclick, oncreate, etc.
Yes, you can close the issue, thanks
Exactly. No matter how they are written, they always are lowercased then written to the dom node.
@jbucaran Is it really that much overhead to support both properly? It’s basically just
.toLowerCase()
. I think it improves readability a lot.