Use of a decoupled CMS is an exciting new approach that many organizations are exploring as a way to remain nimble in rapidly evolving industries. A decoupled approach allows teams to maintain the familiar and robust WordPress admin interface while simultaneously embracing design-forward front end experiences that are engaging, aesthetic and highly flexible. With the recent incorporation of the WordPress REST API into core, these possibilities are now a reality. But how, exactly, can this be achieved on an enterprise scale?
In late 2016, Human Made partnered with TechCrunch to realize these possibilities. The goal itself was ostensibly simple: create a fully decoupled WordPress admin that engaged a React front end to create an app-like experience. Nevertheless, the technical challenges presented as part of this goal were not insignificant, including API challenges, caching, theming in PHP & React, and more. This session will focus on the decision-making and logistical considerations our team took to meet the challenge of creating a holistic WordPress/React product. Presented by both the Project Manager and development team involved, the purpose of this session will be to provide insight and tangible action items for other teams hoping to achieve similar goals.
40. PRESS, PUBLISH, REACT
REACT
WP SCRIPTS
Solution:
•Automatically generated interface displaying data about all
REST API endpoints
WordPress environments for
React applications.
41. PRESS, PUBLISH, REACT
RESTSPLAIN
Self-documenting endpoints.
Challenge:
•Documenting APIs takes time from development
•Stakeholders need access to API information
•On-boarding developers without documentation is hard
45. PRESS, PUBLISH, REACT
REACT
oEmbed Container
Challenge:
•WordPress oEmbeds are static HTML
•Do not work reliably in a single-page-application
Gracefully handle WP
oEmbeds in React
46. PRESS, PUBLISH, REACT
REACT
oEmbed Container
Gracefully handle WP
oEmbeds in React
Solution:
•Find and inject script tags from oEmbeds at render