Transforms JSX class attributes into className and for attributes into htmlFor, allowing you to copy and paste HTML into your React components without having to manually edit these particular attributes each time.
Installation & Usage
Install the plugin:
# For Babel 6
npm install --save-dev babel-plugin-react-html-attrs
# For Babel 5
npm install --save-dev babel-plugin-react-html-attrs@1.0.0
Then edit your .babelrc
to include react-html-attrs
:
{
"plugins": [
"react-html-attrs"
]
}
网友评论