If you keep up on WordPress news at all, you may be aware that WordPress Core will soon include a JavaScript framework, in addition to Backbone.js (which will remain and continue to be maintained). But the hunt for the correct JavaScript framework for WordPress Core has been an interesting one.
Choosing a JavaScript Framework for WordPress
Over the course of the weekly JavaScript Chats held on the WordPress contributor Slack on May 23 and on May 30, the decision has been narrowed down to React or Vue.js. The hope is that WCEU meetings would shed further light on the debate.
During the course of the discussions, in fact, Evan You himself (the creator of Vue.js) commented with his thoughts.
People on both sides of what has shaped up to be a rather fierce debate are, of course, excited to see a new framework being included in Core, but the real question is which one, and why? Here are a few points brought up by people on either side regarding the two candidates:
React
- Has a (relatively speaking) higher learning curve, which might prove to be a barrier especially to new JS developers or WordPress developers adopting JS
- Licensing issues (particularly this one)
- Some WordPress contributors worry about so tightly linking WordPress to React, and by extension Facebook, a company whose ideology does not quite align with that of WordPress.
Vue.js
- Has an easier learning curve
- Is less widely adopted, and therefore some argue it has a smaller user community and a smaller maintenance community as well
- Obscuring JS with a template language is viewed by some as unfriendly to developers
- Having only a single main Vue.js maintainer is considered a danger. The Bus Test is, in summary, the ability of a project to withstand an important contributor abruptly leaving the project (for whatever reason).
There are of course many more points, which are neatly summarized in the linked summaries of the weekly JS chats. Additionally, many points are debatable. Licensing issues with React are seen as a nonissue by some, for example; JSX is seen as a similar hindrance when compared to templating; and Evan You points out that community maintainers mitigate some of the danger of Vue.js survivability.
And of course, all of this has people talking yet again about WordPress and its future with JavaScript. Which parts of WordPress may be JavaScript in the years to come, or will all of it? The same conversation stirred with WordPress.com’s creation of Calypso, the WordPress.com multi-site admin panel (which uses React), but rumblings have died down some in time since, so it seems as though perhaps the WordPress-PHP community are in for another wild ride through the land of JavaScript frameworks with this debate.
What do you think about the future of WordPress and JavaScript? Let us know in the comments!
Jeff works for a startup as a technical writer, does contract writing and web development, and loves tinkering with new projects and ideas. In addition to being glued to a computer for a good part of his day, Jeff is also a husband, father, tech nerd, book nerd, and gamer.