Skip to main content
Version: 0.24

Interface: Page

A page in the app, normally a React component rendered for a Route.

Create one with the page constructor.

Extendsโ€‹

  • BaseSpecElement<"page">

Propertiesโ€‹

authRequired?โ€‹

optional authRequired?: boolean

If true, only authenticated users can access this page. Unauthenticated visitors are redirected to Auth.onAuthFailedRedirectTo.

Cannot be combined with Route.prerender.

Defaultโ€‹

false

componentโ€‹

component: Reference<AnyFunction>

React component rendered for this page.


kindโ€‹

kind: "page"

The internal Wasp type of a SpecElement. Used by the compiler. You should not set this field directly, instead use the dedicated constructors.

Inherited fromโ€‹

BaseSpecElement.kind