2 ms·
> I’ve switched to using ‘h’ as an alias of ‘createElement’ instead of jsx. Why just alias and not go full hyperscript? > For example I made a version using X
by masklinn 9y ago
> I’ve switched to using ‘h’ as an alias of ‘createElement’ instead of jsx.
Why just alias and not go full hyperscript?
> For example I made a version using X instead of h that will parse the tag for “#id.class1.class2” tokens and add them to the props as appropriate saving a pretty decent amount of space. This is very similar to emmet so it’s nothing out of the ordinary.
That reads a lot like hyperscript. You really should take a look.
- lewisl9029 9y agoHyperscript looks neat, but I'm wondering if there are any other major benefits to using it over an alias of `createElement` for someone using component oriented styling libraries like styled-components or glamorous? i.e. when there's no need to specify ids/classes for styling, the id/class shorthands become less useful.