Skip to content

Commit

Permalink
Add React usage instructions to prevent key warnings (#72)
Browse files Browse the repository at this point in the history
Closes #43
  • Loading branch information
Siilwyn authored and goto-bus-stop committed Dec 6, 2018
1 parent a7f19a5 commit edc23c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ $ node vdom.js
var React = require('react')
var toString = require('react-dom/server').renderToString
var hyperx = require('hyperx')
var hx = hyperx(React.createElement)
var hx = hyperx((component, properties, children) =>
createElement(component, properties, ...children)
)

var title = 'world'
var wow = [1,2,3]
Expand Down Expand Up @@ -175,7 +177,7 @@ Return a tagged template function `hx` from a hyperscript-style factory function
Values to use for `h`:

* virtual-dom - `vdom.h`
* react - `React.createElement`
* react - `React.createElement` with parameter `children` spread
* hyperscript - hyperscript

Optionally provide:
Expand Down

0 comments on commit edc23c6

Please sign in to comment.