The ReactJS Front End
Ways to Use React
People are looking at many ways to combine WordPress and React, ranging from cautious enhancements to completely replacing the front end:
- The website at ustwo.com is a single-page site build on React and back-end WordPress.
- An experimental Web application, Twentysixteen-RR, uses React in a traditional WordPress way, emulating the Twenty Sixteen theme. It’s a proof of concept rather than a way to give a site new capabilities.
- The BeesWax theme is built on React and aims to pre-cache content for faster response.
- The WAMU.org news site is built on React and the WordPress API.
- NodeifyWP uses PHP to execute Node.js code on the server using V8Js which is a PHP extension for Google’s V8 engine.
Automattic has unveiled Calypso as the future technology of its WordPress.com. It uses Node.js to build the initial page and makes heavy use of React. Pages communicate with the server entirely through the REST API. Self-hosted sites can use Jetpack to add Calypso-based tools for editing and management. This isn’t the radical, headless approach which others are looking at, but focuses on the administrative side rather than the content. It’s available as a MacOS application and has been worked into the WordPress.com administrative pages.
Not everyone likes the direction WordPress is going. Calypso for self-hosted WordPress requires JetPack, a plugin which many people consider bloated. JetPack also requires a WordPress.com account. The one-page sites which React advocates favor are hard to bookmark. There are many ways to use React in a site, though. They can certainly include a traditional multipage structure with more flexibility and faster responses than the old-style PHP pages.