Headless Server Developer Manual / Version 2110
Table Of ContentsWeb apps, created with the React JavaScript library, are a great way to present content from the CMS to consumers via the headless server. This section provides general information and a guide to set up and develop a React app with the Apollo framework. Apollo connects to the GraphQL endpoint of a CoreMedia headless server and fetches the data to display a CoreMedia page, for which Apollo fits best. This setup and its structure are a recommendation to get started quickly and efficiently. Of course other frameworks or different approaches are possible.
The following sections describe how to set up a new React app, which prerequisites are needed, and how to fetch and render some CoreMedia content in the app.
Note
The GitHub repository https://github.com/CoreMedia/coremedia-headless-client-react includes an example app written in TypeScript including routing, view dispatching, preview integration and more.