Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / Persist

Function: Persist()

Persist(props): HtmlNode

Defined in: flow/src/components.ts:103

Preserves its subtree untouched across SPA navigations and morphs — the element with the given name is carried over instead of re-rendered, so media keeps playing and DOM state survives.

Parameters

props

name

string

children?

unknown

Returns

HtmlNode

Remarks

The children are also marked flow:ignore, so Flow never patches inside them.

Example

<Persist name="player">
  <audio src={src} controls />
</Persist>