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
|
> Add displayName to React.createClass calls
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
**In**
|
||||||
|
|
||||||
|
```js
|
||||||
|
var foo = React.createClass({});
|
||||||
|
```
|
||||||
|
|
||||||
|
**Out**
|
||||||
|
|
||||||
|
```js
|
||||||
|
var foo = React.createClass({
|
||||||
|
displayName: "foo"
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
### In
|
**In**
|
||||||
|
|
||||||
```
|
```
|
||||||
<sometag />
|
<sometag />
|
||||||
```
|
```
|
||||||
|
|
||||||
### Out
|
**Out**
|
||||||
|
|
||||||
```
|
```
|
||||||
<sometag __self={this} />
|
<sometag __self={this} />
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
### In
|
**In**
|
||||||
|
|
||||||
```
|
```
|
||||||
<sometag />
|
<sometag />
|
||||||
```
|
```
|
||||||
|
|
||||||
### Out
|
**Out**
|
||||||
|
|
||||||
```
|
```
|
||||||
<sometag __source={ { fileName: 'this/file.js', lineNumber: 10 } } />
|
<sometag __source={ { fileName: 'this/file.js', lineNumber: 10 } } />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user