I started playing around with React the other day and wrote this plugin as a way to have a real goal instead of just a random tutorial online. This plugin provides a shortcode: [react-postgrid]
that will render a React app that uses the WordPress REST API to generate a Category select box and, once a category is chosen, a paginated grid of posts from that category. Again, nothing fancy, just a way for me to learn React.
This is not production ready, but feel free to poke around to see how I built it, and let me know if there's something I can do better.
- Download, install, and activate plugin
- Place the
[react-postgrid]
shortcode in a theme template file or post/page content