Skip to content

AndersDJohnson/rfc-jsx-attribute-shorthand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

jsx-attribute-shorthand

A proposal for JSX attribute shorthand syntax.

Similar to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#New_notations_in_ECMAScript_2015

const title = 'something'
const onClick = () => {}

<button onClick= title= />

or:

<button {onClick} {title} />

or:

<button { onClick, title } />

or:

<button {{ onClick, title }} />

instead of (already supported):

<button onClick={onClick} title={title} />

or (also already supported):

<button {...{onClick, title}} />

See also: facebook/jsx#23 (comment)

About

A proposal for JSX attribute shorthand syntax.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published