Skip to content

react-wordpress - Add react app simply to WordPress page with shortcode (with Webpack, Babel and Jest)

Notifications You must be signed in to change notification settings

jamesvsshark/reactpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-wordpress

Add react app simply to WordPress page

React dev experience improved with Webpack, Babel and Jest!

Getting started

  1. Setup with Docker
docker-compose up -d --build
  1. Visit http://localhost:8000

  2. Instal Wordpress (first time)

  3. 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.

  1. 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! :)

About

react-wordpress - Add react app simply to WordPress page with shortcode (with Webpack, Babel and Jest)

Resources

Stars

Watchers

Forks

Packages

No packages published