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:
Brian Ng 2016-12-03 19:09:07 -06:00 committed by Henry Zhu
parent 930512e91f
commit b81cf12c7b
3 changed files with 20 additions and 4 deletions

View File

@ -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

View File

@ -4,13 +4,13 @@
## Example ## Example
### In **In**
``` ```
<sometag /> <sometag />
``` ```
### Out **Out**
``` ```
<sometag __self={this} /> <sometag __self={this} />

View File

@ -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 } } />