Skip to content
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

hyperx #68

Closed
dereke opened this issue Mar 13, 2017 · 7 comments
Closed

hyperx #68

dereke opened this issue Mar 13, 2017 · 7 comments

Comments

@dereke
Copy link
Member

dereke commented Mar 13, 2017

it would be cool if hyperdom had integration with hyperx so you could do something like this:

var hx = require('hyperdom/hx')
@refractalize
Copy link
Member

i'm not 100% sure, just because we need to keep hyperdom up to date with the latest hyperx releases, or peer dependency..? But to be honest, this is not hard to do:

var hx = require('hyperx')(require('hyperdom').jsx)

perhaps we just need some docs for it?

@dereke
Copy link
Member Author

dereke commented Mar 20, 2017

I was thinking just having hyperx as a runtime dependency so it wouldn't even exist in hyperdom/package.json

then in hyperdom wrap it in a try catch and throw an error saying you need to install hyperx to use this - just like we do in sworm.

I guess it would be this simple:

try {
  module.exports = require('hyperx')(require('hyperdom').jsx)
}
catch {
  throw new Error('to use hyperx with hyperdom you need to install the hyperx package') 
}

@refractalize
Copy link
Member

refractalize commented Mar 20, 2017 via email

@joshski
Copy link
Member

joshski commented Mar 20, 2017

👍🏻

@joshski
Copy link
Member

joshski commented Mar 20, 2017

Is there some runtime performance penalty for hyperx? Or any way to rewrite hyperx into function calls like we do with jsx?

@dereke
Copy link
Member Author

dereke commented Mar 20, 2017 via email

@dereke
Copy link
Member Author

dereke commented Mar 28, 2017

see #73 for implementation

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

No branches or pull requests

3 participants