Nova · Layouts

Missing paths

A path with nothing at it is not an error. On its own it draws nothing, and in a template it leaves its place empty.

The action, as it is written
{
  id: 'missing-paths',
  data: { member: { name: 'Ada' } },
  layout: {
    component: 'Stack',
    children: [
      { component: 'Text', children: '$.member.name' },
      { component: 'Text', children: '$.member.nickname' },
      {
        component: 'Text',
        children: 'Known as {{$.member.nickname}}.',
      },
    ],
  },
}
Running herepress it

Ada

Known as .

What is done to it
Nothing. It is only drawn.
What it then holds
{ member: { name: 'Ada' } }
What it then says
Ada
Known as .
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.