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,assetUrlandserviceUrlfunctions, theDataFetcherclass and theReact4xpobject - 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/react4xpbuild integration, and a Hello world setup - soenonic project creategives 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
-
Starter - the project layout, defaults and build pipeline the rest of this reference assumes.
-
Library reference - the
render/processHtmlfunctions and theReact4xpobject. -
SSR engine - server-side rendering, hydration and the rendering internals.
-
Configuration, Build, Chunks and Entries - compilation and runtime internals.