> For the complete documentation index, see [llms.txt](https://docs.galex.dev/yamvil/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.galex.dev/yamvil/lexicon.md).

# Lexicon

There are 3 main generic types used in Yamvil

## UiState

**UiState** is straight forward and represents the persistent UI state of your Fragment or Composable Screen. It could be a data class, a sealed class or even better, a sealed interface.

The ViewModel is the class that updates values inside your UiState class, and the Fragment observe this state.&#x20;

## UiEvent

**UiEvent** is a type for representing something in the Screen that the fragment needs to know about.  It could be a data class, a sealed class or even better, a sealed interface.

The fragment will call `viewModel.handleEvent()` with an instance (or object) of this type.

## UiAction

UiAction is a type for representing one-off actions the ViewModel wants the Fragment to react to only once. As before,  it could be a data class, a sealed class or even better, a sealed interface.

To use this, your UiState class should implement the **`Actionable`** interface and call `state.onAction {}` where the UI state is observed.
