Skip to content

Component

Igor Usenko edited this page Aug 2, 2021 · 28 revisions

The part of the UI screen.
An array of the components represents the UI screen. The first element of the array it is the root component, others are child components.
Maintains the state.

struct

  • box
  • componentMutex
  • state (can be NULL)
  • onTouch(mutex, state) (async)
  • render(watchState, componentState, tftApi)

Render function receives defensive copies of watchState, componentState.
In case of a defensive copy of the component's state could not be created - the render function skipped.

Clone this wiki locally