Render Content from State | AIUI | Rokid

Use ink:if, ink:elif, and ink:else to present loading, empty, and complete states. Keep the three branches adjacent.

Render Content from State

Use ink:if, ink:elif, and ink:else to present loading, empty, and complete states. Keep the three branches adjacent.

Complete the Example

Use ink:if, ink:elif, and ink:else to present loading, empty, and complete states. Keep the three branches adjacent.

<page>
  <text ink:if="{{ loading }}">Loading...</text>
  <text ink:elif="{{ items.length === 0 }}">No data</text>
  <view ink:else>Loaded {{ items.length }} items</view>
</page>

Continue with Conditional Rendering.