Skip to content

Just a quick starter for getting a small React app into WordPress via a shortcode.

Notifications You must be signed in to change notification settings

n8finch/react-shortcode-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React App Shortcode Starter

React post sorting

Description: This is a simple React app that queries posts, and is meant as a starter for interactivity. The app itself comes with text and category real time sorting.

Extend at your leasure 🤓. Modify and extend the actual shortcode in shortcodes/post-query-results.php

This is a very basic webpack config, just to compile JSX and runs babel for transpiling.

Install, run, compile.

  1. cd into the react-app directory.
  2. Run npm install.
  3. This gets everything installed, run npm run build to compile.

Things to improve

  • Add in CSS bundling so styles can be added to App.css
  • Watch and compile to the dist folder on save
  • maybe create an npx create-react-shortcode boilerplate... Although just found this: https://github.com/gopangolin/wp-reactivate so maybe I can use that going forward... ¯\_(ツ)\*/¯

Resources Used:

About

Just a quick starter for getting a small React app into WordPress via a shortcode.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published