Skip to content

Commit

Permalink
In README, add ReactDOM to CDN installation and add JSFiddle link
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jan 10, 2017
1 parent ff4a895 commit bda6203
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An HTML to React parser:
Parser(htmlString[, options])
```

The parser converts a string of HTML to [React Element(s)](https://facebook.github.io/react/docs/glossary.html#react-elements).
The parser converts an HTML string to [React Element(s)](https://facebook.github.io/react/docs/react-api.html#creating-react-elements).

There is also an option to [replace](#replacedomnode) element(s) with your own React Element(s) via the [parser options](#options).

Expand All @@ -25,6 +25,8 @@ Parser('<p>Hello, world!</p>');
// same output as `React.createElement('p', {}, 'Hello, world!')`
```

[JSFiddle](https://jsfiddle.net/remarkablemark/7v86d800/)

## Installation

[NPM](https://www.npmjs.com/package/html-react-parser):
Expand All @@ -42,8 +44,9 @@ $ npm install [email protected]
[CDN](https://unpkg.com/html-react-parser/):

```html
<!-- HTMLReactParser depends on React -->
<!-- HTMLReactParser depends on React and ReactDOM -->
<script src="https://unpkg.com/react@latest/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom@latest/dist/react-dom.min.js"></script>
<script src="https://unpkg.com/html-react-parser@latest/dist/html-react-parser.min.js"></script>
```

Expand Down

0 comments on commit bda6203

Please sign in to comment.