An intro to building decoupled WordPress-powered websites using the WordPress REST API and Create React App In recent months, I’ve taken a big interest in the WordPress REST API (hereto referred to as the WP-API) and React. I’ve been writing an introductory series to the WP-API, but decided to break for a more full-length, detailed post.
This post will outline how to get started building decoupled (or “headless”) WordPress web applications with Create React App and the WP-API. While this post is going to focus on React for the frontend, some of the general concepts still apply if you want to build your frontend with something else such as Angular, Rx, Ember, or Vue.
And you don’t have to stop with web applications. You can use the WP-API to power not only web applications, but also mobile apps, gaming console apps, and more, simultaneously.
Before getting started, feel free to clone the repository for this demo.
Your first question may be “why should I care that WordPress has an API?” I’ve already written about this a bit in another post, but if you aren’t up for opening another tab, here are a few highlights: