WordPress Gutenberg and Calypso are back in the tech news now that CIC Matt Mullenweg has rejected React.js as the core JavaScript library for WordPress. The issue is the Patent Clause in Facebook’s licensing which is less than the Open Source Software’s adherence to unencumbered usage standards as in MIT’s license. So Matt felt compelled by some notable clients to reject React as the core JavaScript framework for upcoming WordPress versions using Gutenberg and Calypso.
This is a big deal because it means that a number of JavaScript framework tools are being reconsidered to replace React.js in the upcoming WordPress core.. Here is the skinny on two leading candidates.
Preact.js
Preact.js advertises as a quick replacement for React.js. Click on the screenshot to see it in action.
A variety of sources confirm that Preact has a number of favorable technical comparisons to React.js:
- Preact at 3KB is smaller by a wide margin than React.js;
- This in turn results in better ToDo and also data row benchmark performance over React.js;
- Yet Preact has virtualDOM, ES6, with props, state, and context options and CSS class support;
- Using preact-compat routine Preact emulates React very closely;
- Preact plays well with other JS libraries – see 2048 SVG nodes creation test.
For WordPress Calypso and Gutenberg developer teams, this combo of speed and compatibility with their existing codebase may be so compelling. And Matt has already spoken of a few weeks of conversion time to a new framework. So Preact must be considered a leading prospect to replace React.js.
Vue.js
Vue.js has a lot support in the JS framework derby. Evan You, creator of Vue.js, has advanced a number of arguments in favor of Vue being used as the replacement for React.js:
- Vue easily meets the high Open Source Software standards with its MIT licensing;
- Vue.js has a deserved reputation of being more approachable for learning by newcomers to JS frameworks;
- Vue.js has a number React.js virtues including virtual DOM, reactive and composable components plus extensions for routing and global state ;
- Vue.js has consistently better speed and memory size benchmarks than the latest 15.1.4 React.js and close to Preact.js;
Other reviewers argue that onboarding onto Vue is easier than React.js because of the simpler structure as seen in the sample code:
However, in preparing this review there were ample signs of JavaScript Framework fatigue and change anxiety. So regardless of the final decision, Matt plus the Calypso and Gutenberg teams are going to have to be careful in explaining their choice of the WordPress JavaScript core framework. Not just the major enterprise WordPress users but also the tens of thousands of WordPress plugin and theme developers will be eyeing the future WP JavaScript Framework decision with much concern.