Tuesday 31 October 2017

How to Develop a WordPress Plugin Using Webpack 3, React and the REST API (part 2)


This is article 2 of 2 in the series “How to Develop a WordPress Plugin Using Webpack 3, React and the REST API” How to Develop a WordPress Plugin Using Webpack 3, React and the REST API (part 2)
Have you ever wondered how to get React working with the WordPress REST API? If so you’re in the right place – that’s what we’re going to cover in this follow-up to part one of how to develop a WordPress plugin! In our previous post, we explained what Webpack is and got it integrated into our WordPress sample plugin. We also got BrowserSync set up and reloading our app. In this part we’re going to look at how to get the React side of our plugin working with the WordPress REST API so that the plugin actually does something cool.
So let’s waste no time and get back into it.
In part one we set up a starter plugin called WP React Boilerplate. I’ve now updated this plugin to include the updates made in part two, so feel free to check it out.
Webpack updates
If you recall, in part 1 we went through and learned what Webpack is and how things like loaders and plugins work. If you’re not sure what any of those things are – go ahead and
Source: https://managewp.org/articles/16464/how-to-develop-a-wordpress-plugin-using-webpack-3-react-and-the-rest-api-part-2




source https://williechiu40.wordpress.com/2017/10/31/how-to-develop-a-wordpress-plugin-using-webpack-3-react-and-the-rest-api-part-2/

No comments:

Post a Comment