Skip to main content

Class: ServerPageRenderer

@ima/react-page-renderer.ServerPageRenderer

Server-side page renderer. The renderer renders the page into the HTML markup and sends it to the client.

Hierarchy

  • AbstractPageRenderer

    ServerPageRenderer

Constructors

constructor

new ServerPageRenderer(factory, helpers, dispatcher, settings)

Initializes the server-side page renderer.

Parameters

NameTypeDescription
factoryPageRendererFactoryFactory for receive $Utils to view.
helpers__moduleThe IMA.js helper methods.
dispatcherDispatcherDispatcher fires events to app.
settingsSettingsApplication setting for the current application environment.

Overrides

AbstractPageRenderer.constructor

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:34

Properties

_dispatcher

Protected _dispatcher: Dispatcher

Inherited from

AbstractPageRenderer._dispatcher

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:37


_factory

Protected _factory: PageRendererFactory

Inherited from

AbstractPageRenderer._factory

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:38


_helpers

Protected _helpers: __module

Inherited from

AbstractPageRenderer._helpers

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:39


_settings

Protected _settings: Settings

Inherited from

AbstractPageRenderer._settings

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:40


_viewAdapter

Protected Optional _viewAdapter: ComponentType

Inherited from

AbstractPageRenderer._viewAdapter

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:41


_viewAdapterProps

Protected _viewAdapterProps: UnknownParameters = {}

Inherited from

AbstractPageRenderer._viewAdapterProps

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:42

Methods

_generateViewAdapterProps

Protected _generateViewAdapterProps(managedRootView, pageView, state?): ViewAdapterProps

Generate properties for view from state.

Parameters

NameType
managedRootViewComponentType
pageViewComponentType
stateUnknownParameters

Returns

ViewAdapterProps

Inherited from

AbstractPageRenderer._generateViewAdapterProps

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:128


_getDocumentView

Protected _getDocumentView(routeOptions): ComponentType

Returns the class constructor of the specified document view component.

Parameters

NameTypeDescription
routeOptionsRouteOptionsThe current route options.

Returns

ComponentType

The constructor of the document view component.

Inherited from

AbstractPageRenderer._getDocumentView

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:176


_getViewAdapterElement

_getViewAdapterElement(props?): undefined | ReactElement<{}, string | JSXElementConstructor<any>>

Parameters

NameType
propsObject

Returns

undefined | ReactElement<{}, string | JSXElementConstructor<any>>

Inherit Doc

Inherited from

AbstractPageRenderer._getViewAdapterElement

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:115


_prepareViewAdapter

Protected _prepareViewAdapter(controller, pageView, routeOptions): void

Returns wrapped page view component with managed root view and view adapter.

Parameters

NameTypeDescription
controllerController<{}, {}, {}>-
pageViewComponentType-
routeOptionsRouteOptionsThe current route options.

Returns

void

Inherited from

AbstractPageRenderer._prepareViewAdapter

Defined in

packages/react-page-renderer/src/renderer/AbstractPageRenderer.ts:148


mount

mount(controller, pageView, pageResources, routeOptions): Promise<void | PageData>

Parameters

NameType
controllerControllerDecorator<{}, {}, {}>
pageViewComponentType<{}>
pageResourcesUnknownPromiseParameters
routeOptionsRouteOptions

Returns

Promise<void | PageData>

Inherit Doc

Overrides

AbstractPageRenderer.mount

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:46


setState

setState(): Promise<void>

Returns

Promise<void>

Overrides

AbstractPageRenderer.setState

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:72


unmount

unmount(): void

Returns

void

Inherit Doc

Overrides

AbstractPageRenderer.unmount

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:88


update

update(): Promise<never>

Returns

Promise<never>

Inherit Doc

Overrides

AbstractPageRenderer.update

Defined in

packages/react-page-renderer/src/renderer/ServerPageRenderer.ts:79