Snabbdom Support
See original GitHub issueSnabbdom 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”;
h('div', {
props: {title: someString}, // snabbdom/modules/props
classes: {selected: isSelected}, // snabbdom/modules/class
on: {click: doSomething}, // snabbdom/modules/eventlisteners
style: {color: someColor} // snabbdom/modules/style
}, ['children'])
The snabbdom-jsx
module handles this using prefixed attributes in JSX:
<div
title={someString}
class-selected={isSelected}
on-click={doSomething}
style: {({color: someColor})}
>
children
</div>
Would it be feasible for hyperx to do this as well?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
snabbdom/snabbdom: A virtual DOM library with focus on ...
Features for doing complex CSS animations. Powerful event listener functionality. Thunks to optimize the diff and patch process even further. JSX support, ...
Read more >Snabbdom Renderer - ServiceNow Developers
Snabbdom Renderer. The default renderer is a small virtual DOM library that allows component authors to express their component's view as a function...
Read more >tea-snabbdom / ento / Observable
tea-snabbdom allows you to implement a complex UI within a single Observable cell. It loosely follows the Elm architecture with the help of...
Read more >snabbdom/snabbdom - Gitter
BTW does Snabbdom support embedding a tree in an element, for example document.body even if ... Any modifications not made by Snabbdom will...
Read more >Getting Started With Snabbdom - A Virtual DOM Library
Vue.js, for example, was built on top of Snabbdom. In the official GitHub repo, many other libraries and frameworks using Snabbdom under the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jamen Here is what I ended up with. Essentially:
Good luck with Snabby!
An update on this, I’ve made
snabby
support hooks and various other modules, by using ans-*
prefix (similar tov-*
in vue).Example:
Open to suggestion on how to make this look more nice.