anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.41k stars 130 forks source link

consider aliasing className #411

Open ghost opened 8 years ago

ghost commented 8 years ago

Upstream in hyperx land, I merged a patch so that people won't have to use className in their template strings, but this broke the deku example for using class= in the code which is now aliased to className, which all the other hyperscript-style APIs appear to support. Several of the other APIs only support html element attributes like className, so I really can't win here without bothering somebody.

Would deku folk be open to aliasing className to class? Not because people should be writing className themselves, but because it helps with interoperability with the rest of the ecosystem.

Related: https://github.com/substack/hyperx/pull/22

rstacruz commented 8 years ago

I have no opinion on the matter, but curious: have you tried asking React if they'd be open to aliasing class as className?

anthonyshort commented 8 years ago

Yeah this is fine by me. It's a really small change for us. The React people would probably have a ton of stuff to update.