wp-react-skeleton
A bare bones theme for serving a React app through WordPress
This WordPress theme does one thing, and one thing only: serves a React app through WordPress' index.php. Great for if you're using the JSON API to buils a simple app with content powered by WordPress.
Installation Instructions
-
Clone this repository in your
themes
directory:git clone https://github.com/gopperman/wp-react-skeleton.git
-
Bootstrap your React app. Use create-react-app or your favorite scaffolding to generate an app inside your
wp-react-skeleton-folder
:
cd wp-react-skeleton
npm i -g create-react-app
create-react-app app
-
Get coding!
-
Compile your app using
npm run build
-
In
app/package.json
, edit "homepage" to be the url of your app's static build
Contributing
This is a minimal proof of concept, so there's a lot that can be done around here. Pull requests are always welcome!