React4XP 6 reference documentation

Contents

Server side React rendering for Enonic XP applications.

New to React4XP? Visit our React4XP tutorial for a hands-on, guided introduction.

Introduction

React4XP lets front-end developers build Enonic XP applications with React. React components are rendered server-side and then hydrated in the browser by default, so the same React code runs on both the server and the client (isomorphic rendering).

This documentation covers React4XP 6.x, which builds on React 19 and requires Enonic XP 7.16 or later. For the current version, switch to the 7.x docs.

How React4XP is distributed

React4XP comes in two parts:

Library (lib-react4xp)

The Enonic XP library that does the rendering. It exposes the render, processHtml, assetUrl and serviceUrl functions, the DataFetcher class and the React4xp object - all documented in the Library reference. Available on Enonic Market and GitHub. Your React sources are compiled by the companion npm build tool @enonic/react4xp (npm).

Starter (starter-react4xp)

A ready-to-run project that bundles the library, the @enonic/react4xp build integration, and a Hello world setup - so enonic project create gives you a working React4XP setup in one step. Documented in the Starter reference; available on Enonic Market and GitHub.

A fully working demo application is available on Enonic Market.

In this reference


Contents

Contents