React4XP 6 Release notes

Contents

New features and improvements since version 5

Updated build system

React4XP is now fully aligned with the TypeScript Starter. This means full support for "enonic dev" mode and continuous compilation, as well as fast builds with RSpack.

Single React app

A breaking change is that React4XP now renders pages as a single React app (aka entry), vs one React app/entry per component in version 5. This allows for a cleaner React development setup and more flexibility.

This also means that the <Region> component (part of @enonic/react-components) has been changed, and is now a pure React component, handling the rendering of it’s sub-components directly, rather than relying on the Site engine engine’s placeholder and iterative rendering technique.

Component registry

React4XP now uses the new componentRegistry (part of @enonic/react-components) to render content. The componentRegistry dynamically handles React rendering of pages and content.

The componentRegistry works in combination with the dataFetcher (part of React4XP). The dataFetcher executes server-side controllers to fetch props for each respective component. The result is passed to the componentRegistry for rendering.

Detached front-end

Previous versions were using XP’s site engine directly, meaning that rendering was built and shipped together with the CMS schemas.

V6 severs the tie beween CMS schema definitions and the rendering. This means you may implement the front-end (R4XP rendering) code separately from the CMS schema definition. As such, you may deploy front-end and back-end/model as two (or more) separate applications.

Response processing

React4XP still runs on top of the site engine, which means multiple XP apps can contribute to the request processing via page contributions and response processors. For instance the SEO Metafields applications will inject custom tags to the HTML response - without interfering with the React4XP front-end. Applications that deliver standalone HTML may also be used - but will naturally need their own mapping.

Remember, you may still bundle both CMS model and front-end in the same app.

Upgrading

To migrate a legacy React4XP application we have written detailed upgrade notes.


Contents

Contents

AI-powered search

Juke AI