-
Notifications
You must be signed in to change notification settings - Fork 48
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
Snabbdom Support #36
Comments
You could create a wrapper around snabbdom's |
Maybe this can help https://www.npmjs.com/package/hyperx-to-snabbdom. |
Can this be supported inside hyperx, maybe through special option like |
@niksy How should hyperx deal with snabbdom unique idioms, like hooks? |
Ohh, interesting I've found this after creating a module. I made snabby which is more like yo-yo. @jbucaran for handling hooks inside this module, I plan to use a snabby.hook(vnode, { ...handles })
// Or
snabby.hook(vnode, handle, fn) Although I haven't implemented this yet, or on that note, even written tests for anything... It is pretty experimental Looking for people to collaborate on it, if anyone is interested. |
@jbucaran That structure you've got makes sense after I've experimented more. I'm probably going to have to do something similar. So let me know if you want me to add you as collaborator on Snabby. |
An update on this, I've made Example: snabby`
<div s-hook:destroy=${fn}>
</div>
`
// Using `eventlisteners`:
snabby`
<div s-on:click=${...}>
</div>
` Open to suggestion on how to make this look more nice. |
Snabbdom uses a hyper-script-like function to build it's vdoms, but it's second argument is different. Instead of attributes it's properties are used by various "modules";
The
snabbdom-jsx
module handles this using prefixed attributes in JSX:Would it be feasible for hyperx to do this as well?
The text was updated successfully, but these errors were encountered: