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).
- Updated dependencies and docs
- Fixing a bug in the initial release 1.0.0
- XP7 version (beta)
- XP6 version (beta)