react-wordpress
Add react app simply to WordPress page
React dev experience improved with Webpack, Babel and Jest!
Getting started
- Setup with Docker
docker-compose up -d --build
-
Visit http://localhost:8000
-
Instal Wordpress (first time)
-
Create page and add shortcode
[react-app]
// Additionally...
Copy the ReactApp.php page templated into your theme directory and set this as the page layout to just get the full react app on the page.
- Edit React code in ./wp-content/plguins/react-app/client
// creates a non prod webpack with a watcher to recompile your dist build on changes
yarn run start
// creates a prod webpack build
yarn run build
// run jest tests
yarn run test
Happy coding! :)