[Question] Headless mode is still possible?
drbolsen opened this issue · 1 comments
drbolsen commented
I am referencing to this discussion #627, my understanding is that the consensus was to keep "headless" feature in Hyperapp v2. I could not find any further discussion/development in regard so I presume it should be still available in the latest version.
However I am getting an error when I try creating an app without mounting node, e.g.
app({
init: "foo",
view: (state) => h("div", null, [text(state)])
})
Just wonder if it was lost in transition?
zaceno commented
If you leave off the “view” prop headless mode works.
since you provided a view, hyperapp (quite reasonably) assumes you want to render something, but it fails because you did not tell it where to mount (with the “node” prop)