1. 8
  1. 7

    My only concern is Facebook’s open source now comes with a scary patent clause. I wonder if some alternative libraries will emerge.

    1. 8

      Regarding React, I think Mercury and Mithril are both much better alternatives, from a technical standpoint.

      Both of these libraries use the virtual DOM, but are much faster and smaller. Additionally, Mercury has immutable state baked in, which I think is a huge plus.

      I have mixed feelings when I hear about Reacts burgeoning popularity. On the one hand, the virtual DOM is just so much better than the alternatives. On the other hand, I’m a little sad that the best implementations get less attention. It’s probably because they’re written (seemingly) by lone JavaScript virtuosos, not a big company.

      1. 3

        I’m a bit confused; Mercury itself says that it’s in fact larger in scope than React. Can you explain a little bit more what you were drilling at? Compressed size, slocs, number of concepts?

        I’d also note that being backed by a big company can, unfortunately, be a really big plus, if for no other reason than the tooling. E.g., Kotlin doesn’t bring much new to the table, even in terms of just JVM languages, but the incredibly robust integration with IntelliJ makes it worth following, and while TypeScript is an outstanding language, it owes its popularity mostly to the fact that Microsoft has built really rich support into Visual Studio. In the case of React, it already has tight integration with Blink’s development tools, and integration with IntelliJ, Visual Studio, and other environments is already there, or well underway. This means it can be a bit worse than Mercury or Mithril as a framework, but still end up being better to actually use than those options.

        1. 2

          To answer your question, when I say they’re smaller, I’m just referring to compressed size.

          I agree with you that being backed by a big company is a plus. The ecosystem is important, and React is far more popular at the moment.

          One thing I will say is that React probably needs a little extra tooling just because idiomatic React uses JSX, whereas Mercury and Mithril just use JavaScript. Maybe this is just a preference thing, but I really like the pure JavaScript appraoch. With Mithril/Mercury I can live edit a view and save it in Chrome’s DevTools; this happens without any extra build step or extension.

          On the other hand, last week I googled “mercury codemirror component” and “react codemirror component” - it’s probably no surprise which one I found ready-made on github :)

    2. 1

      Meh, seems like a weekly thought out DCI. Does anyone know if there is a DCI web framework. As someone who doesn’t really do web programming often, I have not seen any.

      1. 1

        I have been using a form of Hexagonal Architecture in js. Great for logging !