4 ms·
A headless component is one that does not return anything for a render by default. It either accepts a prop function the does the render or passes values to it
by cdumler 5y ago
A headless component is one that does not return anything for a render by default. It either accepts a prop function the does the render or passes values to its children and lets them render the results. This splits the functionality from the render so the developer render as appropriate in the application's context is (ie. web page, react native, etc). The headless component may come with multiple styles of renderer available.
- yuchi 5y agoBut an headless React is only tangentially related to headless components. Acko is building a React alternative that follows all React semantics but without any render at all. That means no DOM, no nothing. Just components and effects (un)mounting and updating.
- beardedetim 5y ago> without any render at all. That means no DOM, no nothing. Just components and effects (un)mounting and updating. Don’t we call that the VDOM?
- pininja 5y agoThe virtual dom concept and this blog’s concept has this in common, but this is different because this blog is generalizing it away from the dom. For an example, it applies ideas to graphics (via WebGPU).
- simplify 5y agoIsn't this what Solid.js does, aside from semantics strictly equal to react?
- xwdv 5y agoIt has nothing to do with components. It’s about using react to render to anything, not just a virtual DOM.