Skip to content

add way to replace React.createElement function. #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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