Skip to content

inversepolarity/babel-prop-name-value-shorthand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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)