jsx/JSX

Proposal: faster way to id and classes

rafikalid opened this issue · 3 comments

Acutally we add id and classes like this:
<div id="myId" className="myClass1 myClass2" anotherAttr={...} > ... </div>

A faster and more convenient method will be:
<div#myId.myClass1.myClass2 anotherAttr={...} >... </div>

The issue will be with the react syntax of nested objects like <Provider.container >.... </Provider.container> :/

This is an other improvement:

  • <div#myId /> as shortcut of <div id="myId">
  • <div#.my-class /> as shortcut of <div className="my-class"/>
  • <div#myId.my-class /> as shortcut of <div id="myId" className="my-class" />

Sorry, wrong repo :D