A boilerplate template for a React Wordpress theme with Redux(and Redux Thunk), Bootstrap 4, additional plugins, and a Webpack 4 config that extracts Sass and assets into the dist folder. Jest is included as well, with some example test files.
This is meant as a starting point for a React Wordpress theme with a set up that is friendly to WP devs(components are similar to a regular WP theme).
In theme options, the menu needs to be set as Main Menu in order to show up.
Download, clone, or fork the repo. Using Terminal or Command Prompt navigate to the wp-react-redux-starter directory.
npm install
to install packages and dependenciesnpm start
to run local servernpm run build
to build the project in development mode (compiles in dist directory)npm run prod
to build the project in production mode (compiles in dist directory)npm test
to run Jest testsnpm test:watch
to use Jest to watch
Add the folder to your Wordpress theme folder. (the build needs to be complete in the dist folder)
- Node.js (with NPM)
- Bootstrap 4 - Used the CSS only
- React - A JavaScript library for building user interfaces
- ReactDOM - DOM-specific methods that can be used at the top level
- React Router - A collection of navigational components
- Redux
- React Redux
- Redux Thunk
- Webpack
- Mini CSS Extract
- Jest
- Additional plugins are shown in the package.json
This project is licensed under the MIT License - see the LICENSE.md file for details