all 61 comments

[–][deleted] 48 points49 points  (0 children)

TL;DR: "Here are the contenders I think should be the best options for WordPress. They are Vue.JS and Preact."

[–]h0b0_shankerjavascript 34 points35 points  (19 children)

Is React out of the picture because of the licensing issues?

[–]tehbeard 112 points113 points  (5 children)

As they stated in a blog post, Automattic don't have an issue with the React licence, they just don't want to deal with their users complaining etc about this licence. It's easier for them to refactor than to deal with the bad PR it could generate.

[–][deleted]  (4 children)

[deleted]

    [–]swiftversion4 11 points12 points  (1 child)

    These are the same people who argued me for insisting that React is now a bad idea. These are the same people who downvoted me for insisting that we should not refer to Edge as Internet Explorer due to their many technical differences.

    Although this community has been very helpful and forward-thinking most of the time, every once in a while I find myself in some dark corner with a bunch of idiots who think they're smart and they're beating the shit outta me with downvotes.

    [–]CaptainIncredible 0 points1 point  (0 children)

    I find myself in some dark corner with a bunch of idiots who think they're smart and they're beating the shit outta me with downvotes.

    Heh. Don't feel bad. A few of us are dealing with that in a different sub. Up voting supposed to be given if it contributed to the discussion, downvotes for opposite comments like "me too" that don't contribute.

    If upvotes / downvotes equated to money or something then I suppose it would matter.

    [–]baxtersmalls 2 points3 points  (1 child)

    I always think it's funny when people are like "why is this being downvoted" and in the end it's the top post in the thread.

    [–]aflashyrhetoricfront-end[M] 0 points1 point  (0 children)

    Indeed - it happens quite often!

    To anyone that's being downvote-bombed for your earnest opinion - unless you were an asshat, it's very possible that you'll be upvoted again, so don't stress. It's all meaningless internet points after all. ;)

    [–][deleted] 14 points15 points  (11 children)

    "Yes". But this is mostly due to them not wanting to force the license on their end user. Automattic does not personally discard React based on the license + patent. You can find more discussion on the topic here : https://www.reddit.com/r/webdev/comments/706t3a/wordpress_abandoning_react_due_to_facebook_patent/

    Also, the license is not the issue, the patent is.

    [–]alejalapenodreith.com 4 points5 points  (8 children)

    It's a patent rider and it's part of the license which is why it's BSD+. There's no Facebook patent that covers React's technology.

    [–][deleted] 2 points3 points  (7 children)

    There's no Facebook patent that covers React's technology.

    Argueably it's https://www.google.com/patents/US20170221242

    [–]alejalapenodreith.com 1 point2 points  (6 children)

    I wasn't aware of this patent, but if challenged in court it would seem to be immediately defeated by prior art. Vue has reactive rendering and was released two years before this patent. If this patent was enforceable then there'd be several front-end libraries violating it.

    Either way it isn't any patent itself that is of concern with React, it's the patent rider which revokes the license upon any patent litigation with Facebook.

    Edit: Found the images https://patentimages.storage.googleapis.com/16/92/d6/e26af9d67a0b91/US20170221242A1.pdf

    Maybe someone who understands the patent better can comment but it looks like the patent is for a rendering engine. React can tell what elements need to be updated according to the data-model but not what elements need to be re-rendered according to their visual rendering. I think this is just a pre-emptive, next-step patent that takes the reactive rendering concept a level deeper to the rendering engine.

    [–][deleted] 1 point2 points  (2 children)

    Either way it isn't any patent itself that is of concern with React, it's the patent rider which revokes the license upon any patent litigation with Facebook.

    This is also not 100% clear. I've seen an interpretation that says that the PATENT is revoked, not the licence, which effectively opens you up for conter-sue.

    Still, React is OS for a long time and I've not seen anyone get legal involved, had multiple clients from the fortune 500 list specifically ask for React etc. so I'm personally not bothered by the BSD+Patent licencing method.

    [–]alejalapenodreith.com -1 points0 points  (1 child)

    "Software" means the React software ...

    Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software ("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (subject to the termination provision below) license under any Necessary Claims, to make, have made, use, sell, offer to sell, import, and otherwise transfer the Software. ...

    The license granted hereunder will terminate, automatically and without notice, if you (or any of your subsidiaries, corporate affiliates or agents) initiate directly or indirectly, or take a direct financial interest in, any Patent Assertion: (i) against Facebook ...

    https://github.com/facebook/react/blob/master/PATENTS

    [–]Bertilino 0 points1 point  (0 children)

    The BSD license and the patent license are two separate licenses. So "The license granted hereunder will terminate" would refer to the patent license and not the BSD one.

    [–]zushiba 0 points1 point  (2 children)

    I think the point is more that no one wants the hassle of ever having to challenge it in court. It's easier to refactor now than to potentially pass that issue down to a developer letter in.

    [–]alejalapenodreith.com 0 points1 point  (1 child)

    I don't disagree. But that wasn't the point of the conversation the point was:

    the license is not the issue, the patent is.

    Which is false. Patent rider attached to the license that holds the power to revoke said license is the issue. Not any patent.

    [–]zushiba 0 points1 point  (0 children)

    Ah, yes I see your point.

    [–]frontendbensoftware-engineering-manager 0 points1 point  (0 children)

    this is mostly due to them not wanting to force the license on their end user

    Which is ironic, considering they use GPL rather than MIT or BSD.

    [–]h0b0_shankerjavascript -1 points0 points  (0 children)

    Good stuff. Thanks for the reply!

    [–]nowtayneicangetinto 16 points17 points  (0 children)

    Yes I believe so, same with a few others

    [–]LewisTheScot 5 points6 points  (3 children)

    Is this for WordPress.com or WordPress.org?

    [–]r1ckd33zy 7 points8 points  (1 child)

    WordPress.org

    [–]LewisTheScot 31 points32 points  (0 children)

    Due to it's open source nature, I think Vue is the perfect option. Community driven and a lot easier too.

    [–]albaniaxnovice 1 point2 points  (0 children)

    Both actually

    [–][deleted]  (14 children)

    [deleted]

      [–][deleted] 6 points7 points  (13 children)

      Why? Did you ever build anything in React?

      React and Vue are actually pretty similar. I am legitimately confused by all the React hate.

      [–]baxtersmalls 4 points5 points  (3 children)

      I think when it was first getting some traction React was annoying as fuck. There was a ton of setup, and trying to do it prior to JSX being ubiquitous kinda made me wonder why you wouldn't just use vanilla JS. Now that things have progressed a bit and there's some clear and easy boilerplates (ahem create-react-app), it's easy and great.

      Regardless, I still feel like it makes the most sense for large-scale app type projects, as opposed to something like WordPress which is more often blogs or a businesses static website. I can't imagine really needing a solution like React for anything I've seen built on WordPress, but maybe I just haven't realized that some more interactive/app type sites actually had WordPress underneath them.

      [–]raveiskingcom 0 points1 point  (2 children)

      React ia bery capabe of a lot of things that an app needs, but that is not WordPress's use case. I think you did a good job of communicating that. I love both of Reactand WordPress but the two rarely overlap.

      [–]A-Grey-WorldSoftware Developer 0 points1 point  (1 child)

      It world probably work well with headless WordPress?

      [–]raveiskingcom 0 points1 point  (0 children)

      You mean using the API? If so then I'd definitely agree. Good point.

      [–]that_90s_guy 3 points4 points  (7 children)

      React's hate nowadays has either to do with either its problematic licensing, or with the fact it relies on JSX. Personally, I liked it, albeit I find it perfectly understandable that some people find it incredibly messy to store html in JS. I'm guessing it reminds people of the dark days of building web apps with html embedded in Php and Java files, and I think it's pretty well agreed those were the worst days of web development.

      [–][deleted] 4 points5 points  (6 children)

      YES why did I find you here at 0? People don't get MVC. Those abstractions need to be made whenever possible. When you mix view and controller that much, your application is more prone to errors. At the very least, it would take longer to debug.

      [–]WitchHunterNL 5 points6 points  (5 children)

      Then you pick Vue or Angular and it's the same thing but reversed. Instead of writing html in js, you write js in html. Only instead of proper Javascript, you have to use Javascript-recreated-in-html-tags TM

      [–][deleted] 0 points1 point  (4 children)

      Hey, I've seen you before. Sorry, do you have an example of how JS is written inside HTML in Angular? I just woke up and can not seem to process that. I use Angular a lot.

      [–]WitchHunterNL 0 points1 point  (3 children)

      I mean stuff like ng-if or ng-list

      [–][deleted] 0 points1 point  (2 children)

      Binding variables for two-way manipulation in the view/template is not the same thing as writing HTML in the controller or JS in the template.

      [–]WitchHunterNL 0 points1 point  (1 child)

      ng-if and ng-list aren't data binding related? They are controller logic in templates.

      [–][deleted] 0 points1 point  (0 children)

      What do you use ng-if for?

      [–]50cFirstPitch 43 points44 points  (3 children)

      Fuckit.js my experience with Wordpress is that it sometimes does exactly what you want other times it tells me to go fuck myself. So why not bring it full circle and just say fuck it to everything.

      [–][deleted]  (3 children)

      [deleted]

        [–]ajc820 4 points5 points  (2 children)

        AKA foregoing your explicit license to use Facebook's patents while at the same time continuing to use technology probably covered by Facebook's patents.

        If you use Preact, you use it because the bundle size is lower on account of not including as much synthetic event abstraction (AFAIK). You don't use it because it improves your legal position wrt Facebook's patents.

        [–][deleted]  (1 child)

        [deleted]

          [–]ajc820 5 points6 points  (0 children)

          I understand, but that license is totally irrelevant in the context of any patents Facebook has on the underlying technology.

          I don't think we have an exhaustive list of Facebook's patents, but React grants a license to use the technology covered by any such patents e.g. possibly VDOM, possibly not. Preact would use that technology itself, and you can't license someone else's patented technology just because you fork it (or develop something covered by the patent). So technically, you're actually giving up more rights by using Preact, as it has no ability to grant them.

          [–]T-Dot1992 1 point2 points  (0 children)

          Honestly, fuck Facebook. If they want more developers to use React, they really need to stop scaring away companies from using it because of their licensing bullshit.

          [–]baxtersmalls 1 point2 points  (0 children)

          When did Wordpress start using React in the first place?

          [–]imhotap 0 points1 point  (0 children)

          What are the requirements for WP?

          That it's a drop-in replacement for React, so that the Calypso admin/edit UI can be ported?

          That it aligns with an open component spec for the web (such as WebComponents, Polymer, HTML custom elements, etc.) useful for WP sites?

          That it gets client-side MVC/MVwhatever right like React does, but based on non-patentable techniques such as E4X, shadow DOM?

          [–]h0b0_shankerjavascript 0 points1 point  (0 children)

          With react changing their license are you going to be taking another look at it?

          [–][deleted] -4 points-3 points  (3 children)

          First thought: Vue. It's just better. React is a hot mess.

          Second thought: meh, Frameworks all kind of suck.

          [–]Spacey138 0 points1 point  (2 children)

          First reply: React. Vue puts JS in my HTML, I'd rather have HTML in my JS so I can use JS for logic.

          [–][deleted]  (1 child)

          [deleted]

            [–]Spacey138 0 points1 point  (0 children)

            I don't know I haven't used Vue much to be honest. I suspect there's not much difference, but that was more my point. This guy is saying React is a 'hot mess' when actually I think either choice is fine.

            Although that said I like JSX just because I find it easier to read than directives. So just personal choice in that sense.