choojs / choojs/hyperx

Snabbdom Support

Open
#36 8 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1k
Forks
45
PR merge metrics
No merged PRs in 30d

Description

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";

```
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:

```


children

```

Would it be feasible for hyperx to do this as well?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.