This project is not covered by Drupal’s security advisory policy.

UX React bridges the gap between Drupal's server-rendered Twig templates and React components. Instead of building a separate single-page application, you embed interactive React components directly inside any Twig template with a single function call — react_component('MyModule/Hello', { name: 'World' }). The module handles all the wiring: loading React, registering components, and mounting them in the browser automatically. No custom JavaScript setup required.
This module is a direct Drupal port of the Symfony UX React bundle, adapted for Drupal's extension system, asset pipeline, and service container. If you are familiar with Symfony UX React, the concepts map directly.

Features

UX React provides a react_component() Twig function that embeds React components into any Drupal template. Components are auto-discovered from a components/dist/ folder inside any custom module or theme and registered automatically. A Stimulus controller handles mounting, updating, and unmounting in the browser. Components are addressed by a MachineName/ComponentName convention to avoid collisions across modules.

Project information

Releases