The other week I started playing with a React-based theme using the REST API. The idea is a very simple recipe blog – no comments, no widgets, just a list of post titles on the home page and a pop-up card with the recipe content. Designed by Mel Choyce (of course), the inspiration was vintage recipe cards/books. It seemed like a great candidate for a single-page-app style theme. The theme is called Anadama, and it’s definitely still a work-in-progress. Here’s how it looks so far: It’s definitely still in flux, but I thought it would be fun to talk about, especially with WCUS this weekend. I’m using gulp and webpack to build the JSX into javascript, and I’m trying out some ES2015 features with babel. For the CSS, I’m using Sass, with some component-specific stylesheets living with the components (all still built into the main CSS file — I’m not using Radium or the like). It’s a very simple theme, so hopefully if you’re new to the idea of React + WordPress, this should be easier to understand. Want to check it out? The Anadama-React github repo has instructions to set it up yourself, you’ll just need a few plugins: The REST API for the content API, WP-API Menus for the menus endpoint,
Share This