Add example to transform-react-display-name docs (#4939)
* Add example to transform-react-display-name docs [skip ci] * Normalize in/out markup in transform-react docs [skip ci]
This commit is contained in:
parent
930512e91f
commit
b81cf12c7b
@ -2,6 +2,22 @@
|
||||
|
||||
> Add displayName to React.createClass calls
|
||||
|
||||
## Example
|
||||
|
||||
**In**
|
||||
|
||||
```js
|
||||
var foo = React.createClass({});
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```js
|
||||
var foo = React.createClass({
|
||||
displayName: "foo"
|
||||
});
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
|
||||
## Example
|
||||
|
||||
### In
|
||||
**In**
|
||||
|
||||
```
|
||||
<sometag />
|
||||
```
|
||||
|
||||
### Out
|
||||
**Out**
|
||||
|
||||
```
|
||||
<sometag __self={this} />
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
|
||||
## Example
|
||||
|
||||
### In
|
||||
**In**
|
||||
|
||||
```
|
||||
<sometag />
|
||||
```
|
||||
|
||||
### Out
|
||||
**Out**
|
||||
|
||||
```
|
||||
<sometag __source={ { fileName: 'this/file.js', lineNumber: 10 } } />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user