choojs / choojs/nanohtml

Using JSX with Bel

Open
#56 10 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
688
Forks
48
PR merge metrics
No merged PRs in 30d

Description

I was wondering if its possible to use JSX instead of hyperx to create elements with Bel. I like to use Bel and Yo-yo, but sometimes its convenient to go JSX route, because then components could be re-used between Yo-yo/Choo and React projects.

I tried to set `jsx pragma` to `h` and then use it like so:

``` javascript
var h = require('bel').createElement

var el =

Hi


document.body.appendChild(el)
```

But children (`Hi`) never appear, and if you omit `class`, bel complaints: `Cannot read property 'namespace' of null`. Got confused, probably missing something.

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.