# `OpenUI.Serializer`
[🔗](https://github.com/ideia4it/openui/blob/v0.1.1/lib/openui/serializer.ex#L1)

Writes a rendered tree back to OpenUI Lang (language.md, section 9.2).

The entry comes first; every other component with a statement name becomes
its own statement, children before parents. Props go by position, `null`
holds an unfilled position and trailing nulls of optional props are
trimmed. Query and mutation statements do not round-trip.

# `expression`

```elixir
@spec expression(OpenUI.Parser.Expression.ast()) :: String.t()
```

Serializes an expression, adding the parentheses its grouping needs.

# `to_source`

```elixir
@spec to_source(OpenUI.Element.t(), OpenUI.Library.t() | module(), keyword()) ::
  String.t()
```

Serializes an evaluated tree. `state:` adds `$name = value` declarations
after the components (nil values are skipped).

---

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