Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Brown committed Jul 20, 2014
1 parent 86330a1 commit 9ccb63c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ Parses raw html use htmlparser2 to a React DOM structure.

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.

So the process for now is
```
npm install htmlparser2-react
npm install react
```

Quick example
```javascript
var reactParser = require('./../lib/index'),
var reactParser = require('htmlparser2-react'),
React = require('react');


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


Should you use this? No.

Why would you use this? Maybe you don't want dangerously set innerhtml?

Have fun

Log issues if you find any, I'm sure there are

0 comments on commit 9ccb63c

Please sign in to comment.