[HN Gopher] Headless React
       ___________________________________________________________________
        
       Headless React
        
       Author : jashkenas
       Score  : 126 points
       Date   : 2021-07-06 16:38 UTC (6 hours ago)
        
 (HTM) web link (acko.net)
 (TXT) w3m dump (acko.net)
        
       | stoicjumbotron wrote:
       | Is the performance gain huge if you remove the virtual DOM
       | completely?
        
       | nikisweeting wrote:
       | Acko is back (not that they went anywhere, just excited to see it
       | on HN)! This is one of my favorite personal tech blogs of all
       | time, so many cool easter eggs and animation gems hidden in
       | there. I especially love the Winamp visualizer projects and
       | inspirations you can find sprinkled throughout.
        
         | FroshKiller wrote:
         | Well, why haven't you submitted anything from the blog? They
         | don't get a lot of submissions here. I'd never heard of them.
         | Seems like if you thought it'd be good HN content, you might
         | have submitted. Is there anything else you're sitting on?
        
           | Gigablah wrote:
           | https://news.ycombinator.com/from?site=acko.net
        
       | cormacrelf wrote:
       | This is part 3 of a 3 part series. If you're confused, start at
       | #1, but even then it moves very quickly through a mountain of
       | content, with some assumed familiarity with some aspects of
       | graphics programming in #3. Detailed knowledge about how React
       | fiber works is a mandatory prerequisite and it would help if the
       | posts told you what you were expected to know first.
       | 
       | Most importantly there is working code if you actually click on
       | the links. I didn't at first and missed it because it's not
       | obvious which are crucial to click on. Here it is:
       | https://gitlab.com/unconed/use.gpu
       | 
       | Post #2 about "data flow graphs (DFGs)" and post #3's brief
       | treatment of the double-tree sowing and reaping thing might be
       | easier to understand if you have watched this talk about Jane
       | Street's Incremental, specifically how the various iterations
       | address the dynamic complexity introduced by the `bind` function:
       | 
       | https://www.youtube.com/watch?v=G6a5G5i4gQU
       | 
       | The whiteboard drawings there are fantastic. Yaron starts very
       | near zero and builds steadily from there. Acko's posts start at
       | 900 in about five different domains and zoom to 4900 in each. Of
       | course at 4900 you have a pretty cool and way out of my league
       | declarative and reactive GPU render pipeline but maybe slow down
       | for us a bit!
        
       | filoeleven wrote:
       | Hot (uninformed) take:
       | 
       | The effect system described in the first post immediately
       | reminded me of re-frame, a Clojurescript library that uses React
       | under the hood. I don't know how similar this flow is to that,
       | but they share the key axiom that "declaring an effect should be
       | orthogonal to running it."
       | 
       | I kind of hate generators, so I'm deferring the rest of the
       | article/series until I'm not heat-angry and can read it more in
       | the spirit of curiosity =)
        
       | bronlund wrote:
       | Christ. I can't even tell any longer if I'm the stupid one or...
        
       | eatonphil wrote:
       | From a quick skim and from a few Google searches I cannot find a
       | definition of "headless React". The first sentence in this post
       | already assumes you know what it means, as do most other sites I
       | can find that mention it. Can anyone enlighten me?
        
         | cdumler wrote:
         | 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.
        
           | xwdv wrote:
           | It has nothing to do with components. It's about using react
           | to render to anything, not just a virtual DOM.
        
           | yuchi wrote:
           | But 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 wrote:
             | > 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 wrote:
               | The 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 wrote:
             | Isn't this what Solid.js does, aside from semantics
             | strictly equal to react?
        
         | [deleted]
        
       ___________________________________________________________________
       (page generated 2021-07-06 23:00 UTC)