1. 13
  1.  

  2. 3

    I am the only one to be worried that ReactJS is becoming an Operating System? The new “transition” stuff look much like linux’ nice. I am wondering if ReactJS or Facebook is not hacking its way to fame with a lot of “it is fast and it needs to be fast” to attract developers, when in fact it does nothing to help people write good code that is fast.

    I mean, diff + patch algorithm and declarative approach to GUI is great already. I am not sure a “scheduler” is necessary to make applications go fast.

    ref: https://github.com/reactwg/react-18/discussions/41

    1. 4

      I am not sure a “scheduler” is necessary to make applications go fast.

      What, apart from scrapping the virtual DOM, do you believe is necessary to make applications go fast in React? The React folks have been talking about scheduling and other performance improvement concepts for years, and with good reason. For large quantities of nested components, virtual DOM diffing can be very expensive.

      Imagine an application with a search feature. The search input, filter, and sort features update the results as they’re changed. Each row contains some mixed HTML content and some buttons that do various interactive things. There’s also a reorder feature that lets the user update the items’ indices in their array by dragging and dropping them into new positions. This is just one example of where some frameworks really bog down, both in the initial rendering and in subsequent updates.

      I mean, diff + patch algorithm and declarative approach to GUI is great already.

      Conceptually, I love this approach too. Rendering a new virtual DOM rather than mutating the existing one has (at least prior to hooks) forced developers to familiarize themselves with immutable data structures and think more declaratively about component rendering. However, React is responding to real performance concerns. They’re also responding to the competition, some of which, like Vue, take a moderately different approach to their data binding architecture by using proxies to intercept data mutations and trigger more a selective kind of DOM reconciliation. Some, like Elm and Svelte, take a radically different approach by pre-compiling DOM updates. All of these approaches yield significant improvements over React.