Fix some React transform README issues [skip ci] (#4917)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
# babel-plugin-transform-react-constant-elements
|
||||
|
||||
Hoists element creation to the top level for subtrees that are fully static, which reduces both allocations and calls to `React.createElement`. More importantly, it tells React that the subtree hasn't changed so React can completely skip it when reconciling.
|
||||
|
||||
This transform **should be enabled only in production** (e.g., just before minifying your code) because although it improves runtime performance, it makes warning messages more cryptic.
|
||||
> Treat React JSX elements as value types and hoist them to the highest scope
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# babel-plugin-transform-react-display-name
|
||||
|
||||
Add displayName to React.createClass calls
|
||||
> Add displayName to React.createClass calls
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# babel-plugin-transform-react-inline-elements
|
||||
|
||||
Replaces the `React.createElement` function with one that is more optimized for production: `babelHelpers.jsx`.
|
||||
|
||||
This transform **should be enabled only in production** (e.g., just before minifying your code) because although it improves runtime performance, it makes warning messages more cryptic and skips important checks that happen in development mode, including propTypes.
|
||||
> Replaces the `React.createElement` function with one that is more optimized for production: `babelHelpers.jsx`.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# babel-plugin-transform-react-jsx-compat
|
||||
|
||||
Turn JSX into React Pre-0.12 function calls
|
||||
> Turn JSX into React Pre-0.12 function calls
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# babel-plugin-transform-react-jsx-self
|
||||
|
||||
Adds `__self` prop to JSX elements, which React will use to generate some runtime warnings. All React users
|
||||
should enable this transform in dev mode.
|
||||
> Adds `__self` prop to JSX elements, which React will use to generate some runtime warnings. All React users should enable this transform in dev mode.
|
||||
|
||||
## Example
|
||||
|
||||
@@ -10,6 +9,7 @@ should enable this transform in dev mode.
|
||||
```
|
||||
<sometag />
|
||||
```
|
||||
|
||||
### Out
|
||||
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# babel-plugin-transform-react-jsx-source
|
||||
|
||||
Adds source file and line number to JSX elements.
|
||||
> Adds source file and line number to JSX elements.
|
||||
|
||||
## Example
|
||||
|
||||
@@ -9,6 +9,7 @@ Adds source file and line number to JSX elements.
|
||||
```
|
||||
<sometag />
|
||||
```
|
||||
|
||||
### Out
|
||||
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# babel-plugin-transform-react-jsx
|
||||
|
||||
Turn JSX into React function calls
|
||||
> Turn JSX into React function calls
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user