News for hackers. Stuff that matters.
Re:View Tree Duality by acjohnson55 on Friday August 09, 2019 @09:58PM (#20659681)
I don't think this a duality in the usual sense. It's just an abstraction leakage. It's not clear to me that this is a large-scale problem. But I can imagine it would be helpful for some use cases. Probably just not helpful enough for such a major change.
Re:View Tree Duality by gactleaks on Saturday August 10, 2019 @05:12PM (#20664545)
We need a notion of lifecycle independent of reconciliation. The definition provided in View Tree Duality is natural, essentially locally determined, and efficient (i.e O(n)).

Without an independent notion of lifecycle, React essentially cannot improve it’s reconciliation algorithm.

Re:View Tree Duality by mijoharas on Friday August 09, 2019 @02:39PM (#20657167)
Can anyone elaborate on what this is? I've read the article, but have no idea what gact is.
Re:View Tree Duality by svieira on Friday August 09, 2019 @03:19PM (#20657486)
They are proposing a change the way the lifecycle of a React component is computed. Right now:

    if (someCondition) {
      return <div><Thing /></div>
    } else {
      return <Thing />
    }
will result in `Thing` going through the unmount / re-mount portion of the component lifecycle every time `someCondition` changes. This proposal suggests that instead `Thing` should remain mounted. It has been suggested (in the linked issue https://github.com/facebook/react/issues/16316) that there is a plan to make this possible at some point via something termed "re-parenting".
Re:View Tree Duality by winkywooster on Friday August 09, 2019 @02:58PM (#20657312)
Looks like they're trying to make a point about an issue they posted.. https://github.com/facebook/react/issues/16316
Re:View Tree Duality by gactleaks on Friday August 09, 2019 @09:10PM (#20659529)
Gact is a new framework that will be released in the coming months.

In the time leading up to its release, I am releasing a series of documents explaining core ideas.