babel-prop-name-value-shorthand

1.0.12 • Public • Published

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)

Package Sidebar

Install

npm i babel-prop-name-value-shorthand

Weekly Downloads

68

Version

1.0.12

License

ISC

Unpacked Size

2.74 kB

Total Files

4

Last publish

Collaborators

  • evenzero