Abstract Protected encodeProtected errorThe error message that you get from internal errors, such as validation errors from connectClick
Protected reflectReflect form data on post, meaning that the form will be filled with the data that was sent
use data-reflect attribute to enable it on a specific element
use data-reflect="false" to disable it on a specific element
Protected reqProtected resStatic pathThe path of the page (express route)
Can include params, for example: /user/:id
Protected connectConnect a click event to a function
the function to call
// in useMiddleware
this.connectClick(this.buttonClicked);
// in render
<button name="click" value="buttonClicked">show info</button>
Protected getProtected getProtected importProtected importRender the page
call super.render to use the parent layout
Class that extends BaseLayout, it will be rendered instead of the current page (render as GET)
object, it will respond with json
string, it will respond with text
Any error that is thrown will be caught and rendered as text with the error message and status code 400/500
Connect express middleware or use built in middleware
super.useMiddleware register built in middleware, you can configure it by providing options
The type of encoding to use for the form, will be automatically set by the
bodyParsermiddleware