React & Drupal Examples

This repository contains example code to go along with the tutorials on https://reactfordrupal.com.

The examples demonstrate various different ways that React and Drupal can be used together.

Branches

master - intentionally left empty except this README

read-more Relates to tutorial Create a React Component. Demonstrates how to wrap a Drupal node with a React component that hides a portion of the text behind a "read more" button.

node-list Relates to tutorial Use React to List Content from Drupal. Demonstrates how to retrieve and display content from Drupal + JSON API.

node-edit Relates to tutorial Add, Edit, and Delete Drupal Nodes with React. Demonstrates how to perform CRUD operations on node entities with React in the context of a progressively decoupled React application.

decoupled-node-edit-01 Relates to tutorial Create a Fully Decoupled React Application. Provides a starting point for anyone who skipped to this point in the series.

decoupled-node-edit-02 Relates to tutorial Start with create-react-app. Demonstrates code from node-edit ported to a create-react-app scaffolded application.

decoupled-node-edit-03 Relates to tutorial Use Fetch and OAuth to Make Authenticated Requests. Demonstrates how to use OAuth 2 password grant flow with React to perform user login and make authenticated requests.

decoupled-node-edit-04 Relates to tutorial Extend React with Google Material UI. Demonstrates adding the Google Material UI npm package to a React application and using it to style existing components.