Search code examples
reactjsfrontendfetchdrupal-8

Fetch data from Drupal 8 by Reactjs


Anyone of you know how to fetch data from Drupal 8 database. I want use Drupal 8 as backend because I barely know anything about backend, so Drupal 8 will be my first choice. I want use reactjs to fetch data. So anyone know how to do it? Any modules or plugin to do it?


Solution

  • This module may help : https://www.drupal.org/project/jsonapi

    Installing and enabling this module, let's you serve drupal content as JSON/REST. Those API's can then be adapted by reactjs.

    This tutorial might help too https://colorfield.be/blog/react-and-drupal-8-json-api-1