Skip to content

Commit 9ccb63c

Browse files
author
Jason Brown
committed
Update example
1 parent 86330a1 commit 9ccb63c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ Parses raw html use htmlparser2 to a React DOM structure.
55

66
Apparently React checks instance of ReactDescriptor thus requiring the same React lib to parse/render a component. Ohwell, so just pass in your React to the function.
77

8+
So the process for now is
9+
```
10+
npm install htmlparser2-react
11+
npm install react
12+
```
13+
814
Quick example
915
```javascript
10-
var reactParser = require('./../lib/index'),
16+
var reactParser = require('htmlparser2-react'),
1117
React = require('react');
1218

1319

@@ -29,7 +35,9 @@ There are likely more elegant solutions, like actually hooking into htmlparser2
2935

3036

3137
Should you use this? No.
38+
3239
Why would you use this? Maybe you don't want dangerously set innerhtml?
3340

3441
Have fun
42+
3543
Log issues if you find any, I'm sure there are

0 commit comments

Comments
 (0)