Skip to content

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo committed Jan 14, 2016
1 parent a02dbc1 commit 582aa50
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="2.2.0"></a>
# [2.2.0](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.5...v2.2.0) (2016-01-14)

* add reactElementToJSXString(ReactElement, opts) opts.displayName option to
allow choosing the display name of components


<a name="2.1.5"></a>
## [2.1.5](https://github.com/algolia/react-element-to-jsx-string/compare/v2.1.4...v2.1.5) (2016-01-05)

Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ console.log(reactElementToJSXString(<div a="1" b="2">Hello, world!</div>));
// </div>
```

## API

### reactElementToJSXString(ReactElement[, options])

**options.displayName: function(ReactElement)**

Provide a different algorithm in charge of finding the right display name (name of the underlying Class) for your element.

Just return the name you want for the provided ReactElement, as a string.

## Test

```sh
Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-element-to-jsx-string",
"version": "2.1.5",
"version": "2.2.0",
"description": "Turn a ReactElement into the corresponding JSX string.",
"main": "index-dist.js",
"scripts": {
Expand Down

0 comments on commit 582aa50

Please sign in to comment.