Page History
...
Being aware of the current renderer context can be useful if you need to hit different URLs for content, do rendering or other things conditionally. The status information is retrievable in both frameworks integrating SPA development in Magnolia – Angular and ReactReactJS.
In Angular
In the Angular framework, If you call the isDevMode()
function, which is part of the @angular/core
library, and the developer mode is enabled, you can see the status as a comment in the DOM element.
...
inEditor()
inEditorPreview()
In
...
ReactJS
To retrieve the status in React, make sure that you import {RendererContext}
from the @magnolia/react-renderer
, and that the class of YourComponent
extends the React.Component
.
...