hyperapp: Lazy components cannot return arrays

var h = hyperapp.h, app = hyperapp.app;
/*@jsx h*/
var SomeComponent = function () {
    return function () {
        return [<p>Hello</p>];
    };
};

app({}, {}, function () {
    return (<div oncreate={function (e) {
        setTimeout(function () { alert(e.innerHTML); }, 0); // <undefined></undefined> would be alerted.
    }}>
        <SomeComponent/>
    </div>);
}, document.getElementById("app"));

See JSFiddle: https://jsfiddle.net/vmvaywrr/2/

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Array.isArray() is ES5, supported by IE9

Correct. By the way, lazy components will be removed in 2.0.