Enonic Market Enonic Market
React4xp Lib icon

React4xp Lib

Serverside React rendering integrated with XP components


This (lib-react4xp) is a library of services and utility functions that makes Enonic XP play nice with React. Specifically, it provides out of the box:

  • XP controller functions that make it easy to blend React into XP components with minimal boilerplate code,

  • Serve pre-compiled (*) React components and their dependency scripts to the browser, as well as providing a client-side rendering wrapper and (optionally and adjustably) React and ReactDOM themselves,

  • Automatic dependency/chunk handling, and response headers that ensure efficient client-side caching of components and dependencies.

  • Server-side rendering (optional)

(*) Note: this requires a specific compiled file structure in runtime. This library does not provide that - but there are companion NPM packages tailored for making the build process seamless and easy. See the documentation for complete install instructions - or use the react4xp-starter in Enonic Market for an easier start.

Internet Explorer support: no (but Edge: yes).


  1. 1.0.2

    • Updated dependencies and docs
    • Compatibility:
      • 7.3.0
  2. 1.0.1

    • Fixing a bug in the initial release 1.0.0
    • Compatibility:
      • 7.3.0
  3. 0.3.3

    • XP7 version (beta)
    • Compatibility:
      • 7.0.0
  4. 0.2.3

    • XP6 version (beta)
    • Compatibility:
      • 6.15.0

Download React4xp Lib

This version requires XP

An XP library is normally included in your application through the Gradle build script like this:

                    dependencies {
    include 'com.enonic.lib:lib-react4xp:1.0.2'

Download the source code for React4xp Lib

Documentation for React4xp Lib