-
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In README, add ReactDOM to CDN installation and add JSFiddle link
- Loading branch information
1 parent
ff4a895
commit bda6203
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|
||
|
@@ -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): | ||
|
@@ -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> | ||
``` | ||
|
||
|