1 | # babel-plugin-react-html-attrs
|
2 |
|
3 | 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.
|
4 |
|
5 | ## Installation & Usage
|
6 |
|
7 | Install the plugin:
|
8 |
|
9 | ```
|
10 | npm install --save-dev babel-plugin-react-html-attrs
|
11 | ```
|
12 |
|
13 | Then edit your .babelrc to include `react-html-attrs`:
|
14 |
|
15 | ```json
|
16 | {
|
17 | "plugins": [
|
18 | "react-html-attrs"
|
19 | ]
|
20 | }
|
21 | ```
|
22 |
|
23 | ## Attribution
|
24 |
|
25 | Testing setup cloned from [gaearon/babel-plugin-react-transform](https://github.com/gaearon/babel-plugin-react-transform).
|
26 |
|
27 | ## MIT Licensed
|