babel-prop-name-value-shorthand
v1.0.12
Published
babel plugin for JSX prop name/value shorthand
Downloads
24
Readme
Introduction
Passing props with the same named variable is a rather common, obvious redundancy JSX could do without
Thus, Instead of:
<Auth session={session} reloadSession={reloadSession} />
You can simply write:
<Auth session reloadSession />
Usage
Installation
npm i babel-prop-name-value-shorthand --save-dev
.babelrc
{
"plugins": ["module:babel-prop-name-value-shorthand"]
}
Example
Known Issues
- ts(2322)