trouble / react-wp-rest

A boilerplate for pairing the WP Rest API with a server-rendered React app
MIT License
168 stars 26 forks source link

modifies Preview Changes button within WP dashboard to properly point to client app #3

Closed jmikrut closed 6 years ago

jmikrut commented 6 years ago

Here, we've modified the 'Preview Changes' button within Wordpress to point to the client-side app and opened a new route to provide revision data.

We've also modified the LoadTemplate component so that it watches for the preview URL parameter. If it's found, the component will pull data from the newly opened preview route instead of the default.