# `A2UICore.Resolution.Node`
[🔗](https://github.com/a2ui-elixir/a2ui/blob/v0.1.1/umbrella/apps/a2ui_core/lib/a2ui_core/resolution/node.ex#L1)

One mounted position of a resolved component tree.

A node is one component rendered in one data scope: a template
component that is instantiated for three items is three nodes. Its
`props` hold what a renderer needs:

  * `A2UICore.Resolution.Binding` for dynamic properties,
  * `A2UICore.Resolution.Action` for actions,
  * `{:node, ref}` for a child component (the child is
    `A2UICore.Resolution.NodeResolver.node/2` of that `ref`),
  * plain JSON for everything else.

`state` says what the position holds:

  * `:resolved` — the component's definition is here and its type is in
    the catalog;
  * `:pending` — a parent refers to a component that has not arrived;
  * `:unknown_type` — the definition names a type the catalog lacks;
  * `:cyclic` — the component is referenced by one of its own
    descendants; the repeated reference is cut here.

Placeholders (`:pending`, `:unknown_type`, `:cyclic`) have no props and
no children.

`ref` is the node's identity: it never changes while the position
keeps the same component, and a node that is replaced (a placeholder
that gets its definition, a component whose type changed) gets a new
one. `instance_id` is a readable, deterministic name for the position.

`busy` is true while a property waits for the response to an agent
function call (see `A2UICore.Resolution.NodeResolver`); the property
is `nil` meanwhile.

# `state`
*since 0.1.0* 

```elixir
@type state() :: :resolved | :pending | :unknown_type | :cyclic
```

# `t`
*since 0.1.0* 

```elixir
@type t() :: %A2UICore.Resolution.Node{
  busy: boolean(),
  catalog_id: String.t() | nil,
  children: [pos_integer()],
  component_id: String.t(),
  data_path: String.t(),
  edge: String.t() | nil,
  instance_id: String.t(),
  occurrence: pos_integer(),
  parent: pos_integer() | nil,
  props: map(),
  ref: pos_integer(),
  state: state(),
  type: String.t() | nil
}
```

# `placeholder?`
*since 0.1.0* 

```elixir
@spec placeholder?(t()) :: boolean()
```

True for the states that hold no definition of their own.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
