The WP REST API is a WordPress plugin that intends to be eventually integrated into WordPress’ core as another (big) step towards transforming WordPress from a blogging platform/CMS into a fully fledged application framework. While WordPress is currently a great choice for a broad range of applications, one area where it currently falls short is providing an easy way for external programs to communicate with the WordPress database. This is what the WP-API team is aiming to fix.
In this series, I’ll be showing you how to use the WP REST API plugin and employ WordPress as a datasource for a simple React Native mobile app. The REST API plugin is still in beta and is liable to change in the near future but the v2 API is what will eventually become a part of WordPress so it makes sense to start looking at it and building with it now.
To start, we’re going to be building a simple iPhone app using React Native called ‘Deep Thoughts’ which will pull posts from a WordPress install via the WP REST API and display a random ‘deep thought’ to the user every time they touch a button. We’ll start with the “minimum viable product” or MVP version of this app and add functionality throughout the series by digging deeper into the capabilities of the WP REST API.