RFC: Should we drop JSX support? 🤪🤯
See original GitHub issueEDIT: Thank you everyone for your enormous feedback! For the looks of it, a lot of people around here don’t use or don’t care about JSX or are ready to learn better ways! 😏🙏
Good for us for you! I mean it. I think I am not ready to remove JSX from core and start asking people to get a dependency to support JSX. For every comment and thumbs up, there are more lurking eyes and thumbs that go unnnoticed and I am willing to bet they don’t hold the same courageous opinion.
I feel that I would end up alienating and disuniting more than uniting with a move like this. So, I am happy to close this. 🎉
Should we drop built-in JSX support? Yes or No?
This involves modifying (simplifying really) how hyperapp.h
works, by making it monomorphic (single signature) instead of the current implementation that supports multiple varargs (arguments
are slow!).
Pros
- Better performance.
- More liberty in how components are used / instantiated.
Cons
- No JSX. Or at least not until https://github.com/babel/babel/issues/2034 is resolved.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:23
- Comments:19 (11 by maintainers)
I use JSX with hyperapp but, reading all the discussion it seems pretty easy to support on userland. Perhaps document how to use JSX for those that are interested in it ?
So for me nothing against dropping it 👍
I’ve always found that JSX detracts from the simplicity and purity of hyperapp somewhat. We are pursuing and encouraging, to a degree, a pure and functional approach to building apps. JSX obfuscates and kind of contradicts this intention. WYSIWYG code is good, vanilla JavaScript is good and functions… are good.
h
syntaxWe are not alone in doubting it’s usefulness https://news.ycombinator.com/item?id=11290827
As you know, I hate typing and boilerplate… so I like to imagine how things scale where there are 10 of something for instance, props:
When you can do exactly they same, with just vanilla JS:
There are, of course, more intricate niggles and inconsistencies like
className
etc. but we are all aware of these so I won’t list them.$0.02