zinigor / wp-react-boilerplate

Get started with using React in a WordPress plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WP React Boilerplate

This WordPress plugin demonstrates how to setup a plugin that uses React and ES6 in a WordPress plugin.

Getting Started

  1. Make sure that you have Node.js installed.
  2. Navigate to the plugin directory, install npm dependencies, and run the dev build command:
cd /path/to/wordpress/wp-content/plugins/wp-react-boilerplate
npm install
npm run dev

Commands

npm install - Install dependencies

npm run build – Generate production versions of static assets.

npm run dev - Start webpack in "watch" mode so that the assets are automatically compiled when a file changes.

Documentation

About

Get started with using React in a WordPress plugin


Languages

Language:JavaScript 67.7%Language:PHP 31.4%Language:CSS 0.8%