Package Exports
- wp-plugin-reactjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wp-plugin-reactjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Starter WordPress Plugin ReactJS
A ready-to-use WordPress Plugin makes it easy to integrate React JS into the development of a WordPress Plugin. you can create your JSX components and turn them into Javascript which will be enqueue by WordPress.
Requirements
Install the module bundler Webpack v4+ , webpack-cli globally.
npm install -g webpack
npm install -g webpack-cliInstallation
Clone the repository to the Plugins directory of your WordPress installation:
/ wp-content / plugins /.Install the dependencies :
$ npm install- run webpack :
$ webpackand that's all! 👍 you will have a new directory at the root of your plugin: dist which contains the compiled javascript file.
now you can create your JSX components, and when you're ready, rerun $ webpack.
View
the Plugin create a menu entry in Settings->WP Plugin React , visit this page to see the result.