Ideas for https://github.com/fgnass/jssx
Currently JSSX follows a simple rule to decide whether a prop is class name or a regular HTML attribute:
For any given prop, if a JSS class with the same name exits, it is interpreted as className, otherwise as attribute.
Given that implementation you should not use classes that would also be valid HTML attributes. A safe and simple way to achieve this is to add a prefix like _
to your class names:
<div _button _disabled={true}>
An alternative approach would be this: Only props starting with a certain prefix are interpreted as classes, all others are attributes. When looking up the actual class, the prefix is stripped:
<div $button $disabled={true} />
This would also allow us to introduce the following shortcut:
<$foo>
<$bar />
</$foo>
... which would translate into:
<div $foo>
<div $bar />
</div>