Components at Edge

Want an interactive way to learn about components? Check out the DXP Component Library for best practice examples.

Components at Edge is a Squiz DXP Component Service runtime implementation.

The Edge component runtime does not support the existing way of writing server components.

To use this runtime, developers must modify their components' entrypoint and some runtime APIs.

This documentation covers the differences between extant 'server' and new 'edge' components and explains how to convert an existing component to the new Edge runtime.

Server-side Components, Components at Edge & Javascript syntax

Server-side DXP Components and DXP Components at Edge do not use the same JavaScript syntax.

Server-side DXP Components use commonJS syntax. DXP Components at Edge use ES Modules.

See Input Object Structure for an example of the JavaScript syntax required for Server-side DXP Components.

See the Components at Edge tutorial for an example of the JavaScript syntax required for DXP Components at Edge.

Prerequisites

  • If you intend to run components using the at edge runtime implementation, you must have version Node.js 20.13.1 or later.

Goals

At the end of these instructions you will know;

  • How to write a component that uses the Edge runtime implementation,

  • How to convert an existing component to use the Edge runtime implementation.