This is a component that renders content nodes from a Sitevision Headless API.
npm install react @sitevision/headless-content-renderer
yarn add react @sitevision/headless-content-renderer
import * as React from 'react';
import { HeadlessContentRenderer } from '@sitevision/headless-content-renderer';
const App = ({ contentNodes, baseUrl }) => {
return <HeadlessContentRenderer contentNodes={contentNodes} baseUrl={baseUrl} />
};
Option | Type | Description |
---|---|---|
contentNodes |
array |
An array of content nodes as they are delivered from the Sitevision Headless API |
baseUrl |
string |
The origin of the headless page that you want to render |