Nova · Actions

Lifecycle

The steps under lifecycle.mount run once, when the action is put on a canvas, before anything is pressed.

The action, as it is written
{
  id: 'lifecycle',
  data: { status: 'waiting' },
  layout: {
    component: 'Text',
    children: 'This action is {{$.status}}.',
  },
  lifecycle: { mount: [{ set: 'status', value: 'on its canvas' }] },
}
Running herepress it

This action is on its canvas.

What is done to it
Nothing. It is only drawn.
What it then holds
{ status: 'on its canvas' }
What it then says
This action is on its canvas.
Output matches the expected value

Left: the action as the package ships it. Right: the same action running in this page, rendered with this site’s components. Below: the action run as the example specifies, on the installed package.