Skip to content

enoson/react-array-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-array-element

JSX:

<div className="comment">
  <h2 className="commentAuthor">
      {this.props.author}
  </h2>
</div>

react-array-element:

import $ from 'react-array-element'

$(".comment",
   ["h2.commentAuthor", this.props.author])

JSX:

<ComponentA id="email-input"
  style = {style} onClick = {this.onClick} >
  <input
    type="email"
    onKeyUp={ this.onKeyUp } />
</ComponentA>

react-array-element:

$("ComponentA#email-input",
  {style, onClick:this.onClick},
  ["input", {
    type:"email",
    onKeyUp: this.onKeyUp }])

No more div,id,className,{},closing tag, just vanilla array.

About

JSX replacement, using vanilla array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published