react-hyperscript icon indicating copy to clipboard operation
react-hyperscript copied to clipboard

add way to replace `React.createElement` function.

Open fiatjaf opened this issue 7 years ago • 0 comments

I wanted to use this package with https://github.com/calmm-js/karet (and also https://github.com/infernojs/inferno, but mostly karet) and doesn't seem to be a way, unless I forked it just to replace the react import with karet. But I guess this solves all the problems while still keeping everything working as it is.

Now if I want to use karet I can do

const h = require('react-hyperscript')
h.createElement = require('karet').createElement

and use it normally.

fiatjaf avatar Jun 14 '17 21:06 fiatjaf