etch
etch copied to clipboard
Null-elements are not allowed?
There are use-cases when it is not necessary to create an element for a component, for example, when we render WebGL/regl or canvas2d layers:
<canvas id="canvas">
<Grid canvas="#canvas" type="cartesian" />
<Plot canvas="#canvas" data={data} />
<Text canvas="#canvas" text="Test Plot" />
Would that be reasonable to disable strong assertion of instance.element property? Or not forcing render to return etch virtual-dom?
Faced this issue trying to make gl-component API compatible with etch.
The simplest trick is using this.element = document.createTextNode('') and passing etch.update(this, false) to ignore rerender.