Publish Apps created with "Create React App" on your WordPress Site using shortcodes.
Simple: https://testend.westhofen.me/sample-page/
Advanced (Routing & Fetching): https://testend.westhofen.me/advanced-example/
Todo List with Firebase Auth: https://testend.westhofen.me/todo-example/
- Download the release from this repository
- Install the plugin in WordPress using the uploader
- Go to React Apps and create a new React App
- Upload the ZIP file of your Create-React-App build and save the post.
- Use the shortcode anywhere you like.
[React-App id="POSTID"]
- id: The ID of your application.
- stylesheet: "on" or "off", if you want to disable the react stylesheet (default: on)
- This only works with Create-React-App and is tested with the latest Version.
- You need to be careful about CSS Styling - it will apply to the whole page (Wordpress/React vice versa). JS Styling is recommended.
- Routing works with HashRouter from react-router. BrowserRouter doesn't fully work on page refresh.
- If you want to use multiple shortcodes per page, you need to change the main div from "root" to something else for each app.