TreeState

class TreeState

Constructors

Link copied to clipboard
constructor(fromState: TreeState?)
constructor(initialResolveState: InitialState, initialLayoutState: InitialState)
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

This class represents whether this Litho tree has been mounted before. The usage is a bit convoluted and will need to be cleaned out properly in the future.

Properties

Functions

Link copied to clipboard
fun addState(key: String, state: ComponentState<*>, isNestedTree: Boolean)
Link copied to clipboard
fun applyLazyStateUpdatesForContainer(componentKey: String, container: StateContainer, isNestedTree: Boolean): StateContainer
Link copied to clipboard
fun applyStateUpdatesEarly(context: ComponentContext, component: Component?, prevTreeRootNode: LithoNode?, isNestedTree: Boolean)
Link copied to clipboard
fun bindEventAndTriggerHandlers(createdEventHandlers: List<Pair<String, EventHandler<*>>>?, componentScopes: List<ScopedComponentInfo>?)
Link copied to clipboard
fun <T> canSkipStateUpdate(updater: (T) -> T, globalKey: String, hookStateIndex: Int, isNestedTree: Boolean): Boolean
fun <T> canSkipStateUpdate(globalKey: String, hookStateIndex: Int, newValue: T, isNestedTree: Boolean): Boolean
Link copied to clipboard
fun commit()
Link copied to clipboard
fun commitLayoutState(localTreeState: TreeState)
Link copied to clipboard
fun commitResolveState(localTreeState: TreeState)
Link copied to clipboard
fun <T> createOrGetInitialHookState(key: String, kStateIndex: Int, initializer: HookInitializer<T>, isNestedTree: Boolean, componentName: String): ComponentState<KStateContainer>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getCachedValue(globalKey: String, index: Int, cachedValueInputs: Any, isNestedTree: Boolean): Any?
Link copied to clipboard
fun getEventTrigger(triggerKey: String): EventTrigger<*>?
fun getEventTrigger(handle: Handle, methodId: Int): EventTrigger<*>?
Link copied to clipboard
fun getState(key: String, isNestedTree: Boolean): ComponentState<out StateContainer>?
Link copied to clipboard
Link copied to clipboard
fun markStateInUse(key: String, isNestedTree: Boolean)
Link copied to clipboard
fun putCachedValue(globalKey: String, index: Int, cachedValueInputs: Any, cachedValue: Any?, isNestedTree: Boolean)
Link copied to clipboard
fun queueHookStateUpdate(key: String, updater: HookUpdater, isNestedTree: Boolean)
Link copied to clipboard
fun queueStateUpdate(key: String, stateUpdate: StateContainer.StateUpdate, isLazyStateUpdate: Boolean, isNestedTree: Boolean)
Link copied to clipboard
fun recordRenderData(layoutState: LayoutState)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun removePendingStateUpdate(key: String, isNestedTree: Boolean)