Image

Use create-react-app to Start a Decoupled React Application for Drupal 8, 9, and 10

Using create-react-app we can scaffold a stand-alone React application with boilerplate configuration and organization already in place. It's a great way to get started using React, as well as the ecosystem of associated tools like Webpack, Jest, and Babel. After creating the scaffolding, we'll port the code we wrote in previous tutorials to the new structure.

In this tutorial we'll:

  • Use create-react-app to scaffold a new React project
  • Refactor existing code into the organizational structure used by create-react-app
  • Confirm that our code runs

By the end of this tutorial, you should know what create-react-app is and how to get started using it.

Decoupled Headless Drupal