Skip to content

add way to replace React.createElement function.#32

Open
fiatjaf wants to merge 1 commit intomlmorg:masterfrom
fiatjaf:patch-1
Open

add way to replace React.createElement function.#32
fiatjaf wants to merge 1 commit intomlmorg:masterfrom
fiatjaf:patch-1

Conversation

@fiatjaf
Copy link

@fiatjaf fiatjaf commented Jun 14, 2017

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.

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

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

and use it normally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant