The current page is rendered using the component provided for the corresponding page class via Scrivito.provideComponent
.
[New in 1.30.0]If present, Scrivito.CurrentPage
renders the layout components that have been defined for the classes of the pages that constitute the path of the current page. Layout components can be defined using Scrivito.provideLayoutComponent
.
Props
<Scrivito.CurrentPage>
does not accept any props.
Remarks
To build a very simple serverless single-page application, it is sufficient to mount the <Scrivito.CurrentPage>
component into the DOM. Thus, rendering any page and its widgets boils down to a single JavaScript call, embedded in some HTML boilerplate: