Package-level declarations
Types
A list of all roles used for accessibility. There is no API for these in Android yet, so roles are currently based off of the class being rendered. These roles are defined by Google's TalkBack screen reader, and this list should be kept up to date with their implementation.
This type of key is used to represent an attribute that reflects an Action (such as click, long click, etc).
Utilities for animations debug.
This abstraction allows us to retrieve a LifecycleOwner. This class is meant to be used to identify the closest LifecycleOwner and associate it to the ComponentTree.
This LithoVisibilityEventsController implementation dispatches to the registered observers the lifecycle state changes triggered by the provided LifecycleOwner. For example, if a Fragment is passed as param, the observers will be registered to listen to all of the fragment's lifecycle state changes.
Interface for something (e.g. a Component or a useEffect registration) which should receive callbacks when it is attached/detached from the tree.
This abstraction is used as an identifier for a given attribute of type T. Attributes are used for testing purposes, allowing the clients to filter and assert on Component according to them.
Defines an abstraction that knows how to store attributes.
Simple holder which allows to store and retrieve attributes.
A Batched State Update Strategy will define when do we schedule a final state update and corresponding layout calculation, so that we can enqueue the most reasonable number of state updates without incurring with an excessive number of layout calculations.
Contains the data and flags for view attributes that have been migrated to the onBindViewWithDescription binder pattern behind the useViewStyleBinders config flag.
Contains the 23 view attribute properties from NodeInfo that have been migrated to the onBindViewWithDescription binder pattern behind the useViewStyleBinders config flag.
Contains the 21 view attribute properties that have been migrated to the onBindViewWithDescription binder pattern behind the useViewStyleBinders config flag.
An implementation of working range that uses offset to define the upper bound and the lower boundary. If the position is inside the boundary, it's in the range, otherwise it's out of the range.
A single hook's cached value.
Defines a single tree prop, i.e. a mapping from type to concrete instance of that type that is visible to the subtree, to be used with TreePropProvider.
Components should implement an event of this type in order to receive Android click events. The method is equivalent to the Android method View.OnClickListener.onClick. An example of the correct usage is:
Provides util methods for common collection patterns.
A Component that renders its children in a column.
Migration scaffolding: a typealias for the legacy SpecGen Column class under a non-colliding name. See RowBuilder for rationale.
Internal class that holds props that are common to all Components.
A Context subclass for use within the Components framework. Contains extra bookkeeping information used internally in the library.
Focus change listener that triggers its underlying event handler.
Represents a Component's computed layout state. The computed bounds will be used by the framework to define the size and position of the component's mounted android.view.Views and android.graphics.drawable.Drawables returned by com.facebook.litho.annotations.OnMeasure.
Long click listener that triggers its underlying event handler.
The result of a Component#resolveWithResult call. This will hold the LithoNode this Component resolved to as well as CommonProps of this component.
The implicit receiver for KComponent.render call. This class exposes the ability to use hooks, like useState, and convenience functions, like dp.
This is intended as a hook into android.util.Log, but allows you to provide your own functionality. Use it as ComponentsReporter.emitMessage(level, message); As a default, it simply calls android.util.Log (see DefaultComponentsReporter). You may supply your own with ComponentsReporter.provide.
This is intended as a hook into android.os.Trace, but allows you to provide your own functionality. Use it as
Touch listener that triggers its underlying event handler.
Represents a tree of components and controls their life cycle. ComponentTree takes in a single root component and recursively invokes its OnCreateLayout to create a tree of components. ComponentTree is responsible for refreshing the mounted state of a component with new props.
This is used as a listener for events that happen on the scope of a given ComponentTree. These events can be related with both the render UI pipeline, or with the view-side events created by rendercore in the LithoView that is associated to the ComponentTree to which this listener observes.
Helper class in charge of dumping the component hierarchy related to a provided ComponentContext
Thread-safe singleton registry that holds weak references to all ComponentTree instances that are still in memory, including released ones that have not been garbage collected yet.
Marker for the Litho container component DSL. This makes sure that when we have scope-specific functions like child() to add children, they can only apply to the closest receiver annotated with ContainerDsl.
Pre-allocate the mount content of all MountSpec in the given ComponentTree.
A DebugComponent represents a node in Litho's component hierarchy. DebugComponent removes the need to worry about implementation details of whether a node is represented by a [ ] or a ComponentLayout. The purpose of this class is for tools such as Flipper's UI inspector to be able to easily visualize a component hierarchy without worrying about implementation details of Litho.
Describes DebugComponents for use in testing and debugging. Note that com.facebook.litho.config.ComponentsConfiguration#isEndToEndTestRun must be enabled in order for this data to be collected.
DebugHierarchy provides a light(er) weight way to track and access information about the component parentage of a given com.facebook.rendercore.MountItem. For a given com.facebook.rendercore.MountItem, it provides access to a linked list of Class objects representing the class of the Component and each of it's hierarchy parents.
A DebugLayoutNode is a wrapper around InternalNode which allows debug tools to inspect and mutate internal nodes without making InternalNode a public class. This class should never be used in production and only for building debug tools.
Default implementation of ErrorEvent handler.
Memory-efficient linked structure for auto-generated keys. Used when the config flag is on and no manual key is present in the ancestry.
This is an output only DeferredLithoLayoutResult; this is created by a DeferredLithoNode.
This class is a placeholder for the unresolved layout and result of a Components which implement the com.facebook.litho.annotations.OnCreateLayoutWithSizeSpec and com.facebook.litho.layout.RenderWithConstraints.The TreePropContainer, padding and border width properties and held separately so that they can be copied into the actual deferred node result before measuring it.
An event handler that takes two event handlers and calls both of them when an event is dispatched.
Defines a tooltip that can be passed to the ComponentTree to be anchored to a component. The framework takes care of finding the position where the tooltip needs to anchored.
Allows a new DynamicValue to be derived from an existing DynamicValue, with modifications applied.
Represents a diff between two T values. It should be used when defining the ShouldUpdate callback in a ComponentSpec and may be used in OnCreateTransition to define animations based on incoming changes. A Diff holds the previous and next value for a specific Prop or State for a ComponentSpec.
Components should implement an event of this type in order to receive callbacks to View.dispatchPopulateAccessibilityEvent
Static class containing a factory method for creating a matrix to apply to a drawable.
Takes care of dynamic Props
Class represents a DynamicValue, and provides users with ability to change the value, by exposing one public method set It also allows attaching listeners (package level access), and takes care of notifying them when the held value changes.
A component which renders nothing.
A Function1 event lambda that is backed by a real EventHandler, so that lambda-shaped event handlers behave exactly like the ones produced by the generated non-lambda on<Event>(c) factory.
An interfaced used by ComponentContext to notify the holder of a Litho hierarchy that as a result of error handling the root of the tree should change to a Litho component representing the error.
An event used internally to propagate exceptions up the hierarchy. Don't use this directly. Use com.facebook.litho.annotations.OnError instead.
This class is an error event handler that clients can optionally set on a ComponentTree to gracefully handle uncaught/unhandled exceptions thrown from the framework while resolving a layout.
A class implementing this fun interface will expose a method to dispatch an com.facebook.litho.annotations.Event given an EventHandler.
Plugin style that can be used for instrument before & after the event is dispatched by EventDispatcher.dispatchOnEvent
Holds onto the mutable data used to dispatch an event. This data is kept up-to-date with the latest version of the owning component or section by EventHandlersController.
Controller which makes sure EventHandler instances are bound to the latest instance of the Component/Section that created them.
Allows a top-down communication with a component and its immediate parent. The component must be able to handle com.facebook.litho.annotations.OnTrigger events in order to accept an EventTrigger.
Composite key for EventTrigger lookup. Uses the parent's key (a GlobalKey for components, a String for sections), the trigger method ID, and the child key to form a unique identity.
Keeps all valid instances of EventTrigger from the hierarchy when the layout is completed
A class implementing this fun interface wll expose a method annotated with com.facebook.litho.annotations.OnTrigger to accept an com.facebook.litho.annotations.Event given an EventTrigger
A LithoHandler implementation that runs all layout computations against the provided Executor. This LithoHandler can be used in apps that have a well established threading model and need to run layout against one of their already available executors.
Base for the LEGACY Row.Builder / Column.Builder. It keeps the exact Component.ContainerBuilder fluent surface (so every existing Row.create(c)...build() call site — Java or Kotlin — compiles unchanged and so Component.ContainerBuilder<?> handles keep working). The selected implementation is snapshotted when the builder is created: setters write directly to the legacy component when the flag is off, and accumulate a Style only when the flag is on.
Event triggered when focus changes on a Component.
Create multiple FocusOrderModels, which can to be used to specify a focus traversal order.
Instances of this class are used to uniquely identify Components for triggering external events including showing a LithoTooltip or triggering an com.facebook.litho.annotations.OnTrigger event.
A class implementing this interface will expose a method to retrieve an EventDispatcher.
A class implementing this fun interface will expose a method to record all the EventTrigger into a EventTriggersContainer
An fun interface that a mountable view can extend which informs that this mountable content has other LithoView children. This is used to make sure to unmount this view's children when unmounting this view itself.
A globally unique key for a hook call within a component tree. Combines the component's global key with the hook-local identity and the RenderScope in which the hook executes.
Executes the hook-identity code path once at startup so that Meta's production ART profile learns it.
Interface for a block of code that will initialize a hook value.
EXPERIMENTAL - fun interface for a block of code that will update state created with useState. See KState.kt for more details.
A specific MountContentPool for HostComponent - needed to do correct recycling with things like duplicateParentState.
A UI element that contains simple resource drawables.
The InitialStateContainer is a lookaside table used by a ComponentTree to create initial states for Components. The idea is that the onCreateInitialState result for each component will be cached and stored here so that we can guarantee it's not called multiple times on multiple threads. We keep the initial states cached as long as there is a layout happening for the ComponentTree. As soon as we detect that all in-flights layout have terminated we can clean up the initial states cache.
An AutoCloseable scope that pairs TreeState register/unregister lifecycle into a single object. Creating a scope registers the TreeState's InitialState handler; closing it unregisters. Close is idempotent—safe to call multiple times.
Components should implement an event of this type in order to intercept Android touch events. The method is equivalent to the Android method ViewGroup.onInterceptTouchEvent - implementations should return true if they intercepted the event and wish to receive subsequent events, and false An example of the correct usage is:
Container for inter-stage props. A component with inter-stage props will generate its own InterStagePropsContainer implementation which will hold fields for each inter-stage prop specified.
Base class for Kotlin Components.
The StateContainer implementation for Kotlin components. Tracks all state defined by useState calls for the same component (see KState for usage). Immutable by default: every copy-on-write mutation returns a new instance with the prior entries copied and one entry added or replaced. The one exception is the transient render-owned fork (mutableForkWith / mutateInPlace): a render forks a single mutable copy of its component's container and then mutates that copy in place for the rest of the pass, tracked by ComponentScope.ownedStateContainer. Committed/shared containers are never mutated in place - a subsequent render forks them.
Guards View.LAYER_TYPE_HARDWARE promotions against the device's GPU max texture size.
A container component that owns the children it is given.
LayoutParams that override the LayoutManager.
The main role of LayoutState is to hold the output of layout calculation. This includes mountable outputs and visibility outputs. A centerpiece of the class is LithoReducer#setSizeAfterMeasureAndCollectResults(ComponentContext, LithoLayoutContext, LayoutState) which prepares the before-mentioned outputs based on the provided LithoNode for later use in MountState.
A TextContent.Item read from the Layout a text component draws, shared by Litho's legacy text drawable and RenderCore's text view so both report text the same way.
Litho's implementation of the AnimatableItem required by the TransitionsExtension to power animations. This object should NOT be used to inform the should update during mounting, therefore it should NOT be used to host any such information.
Simple wrapper of GestureDetector to be used in Litho lifecycle methods. Using this class ensures that UI Thread Handler is used for detecting gestures.
Helper for dispatching events to multiple MountListenerExtensions in Litho.
Wraps objects which should only be available for the duration of a LayoutState, to access them in other classes such as ComponentContext during layout state calculation. When the layout calculation finishes, the LayoutState reference is nullified. Using a wrapper instead of passing the instances directly helps with clearing out the reference from all objects that hold on to it, without having to keep track of all these objects to clear out the references.
This object will host the data associated with the component which is generated during the measure pass, for example: the InterStagePropsContainer, and the UpdateState. It will be created in LayoutResult#calculateLayout(LayoutContext, int, int). This object will be returned by LayoutResult#getLayoutData(), then written to the layout data in RenderTreeNode during reduce.
A data structure that holds the result of Litho layout phase.
This is the default implementation of a LayoutResult for Litho.
Exception class used to add additional Litho metadata to a crash.
This class hosts any extra mount data related to MountItem.
LithoNode is the Node implementation of Litho.
A class that represents a Primitive with Style that should be applied to the PrimitiveComponent.
A Litho abstraction of RenderEffect. Android RenderEffect is a wrapper for native code, which means that the instances are never equal and if we pass such instances through Litho, it may break some of our optimizations which rely on object equivalence.
A renderer for Litho components that handles RESOLVE and LAYOUT.
An implementation of BaseMountingView that can mount a LayoutState without the need for a ComponentTree
Registry of component state that can be snapshotted into Android saved state.
A lifecycle-backed namespace for state declared with useSaveableState.
Logger for tracking Litho events happening during startup.
Owns AndroidX ViewModel instances used by Litho components.
Helper class to access metadata from LithoView that is relevant during end to end tests. In order for the data to be collected, ComponentsConfiguration#isEndToEndTestRun must be enabled.
Manages a Litho visibility events and informs subscribed LithoVisibilityEventsListener when a visibility state changes.
Default LithoVisibilityEventsController implementation. Defines the standard state changes for a Litho ComponentTree. A custom LithoVisibilityEventsController implementation can change the lifecycle state but delegate to this to handle the effects of the state change. See an example of how this facilitates a custom lifecycle implementation in AOSPLithoVisibilityEventsController.
Can observe lifecycle changes that a LithoVisibilityEventsController goes through.
Companion to LithoYogaMeasureFunction used by the CSS Flexbox §4.5 automatic minimum sizing probe. Registered on the underlying YogaNode alongside the regular measure function so Yoga's YGMinContentMeasureFunc invokes this when probing a flex item for its min-content contribution along the parent's main axis.
Components should implement an event of this type in order to receive Android long click events. The method is equivalent to the Android method View.OnLongClickListener.onLongClick
Structural key for components with a manual key (set via .key("...")). Unlike StringGlobalKey, this preserves the parent pointer so that structural descendant checks work across manual key boundaries without falling back to string prefix comparison.
A Drawable that wraps another drawable.
An utility class to verify that an old measured size is still compatible to be used with a new measureSpec.
Read & write layout result cache used during render phase for caching measured results that happen during component-measure. This cache can be accessed via components or litho-nodes.
An interfaced used by ComponentContext to access the root view on which a hierarchy is mounted. This interface needs to be passed in the ComponentContext when it's built.
This RenderUnit encapsulates a Litho output to be mounted using Render Core.
The NestedLithoTree should be used to render Litho components in a container, say a Primitive like a ScrollView or when embedded Litho hierarchies in other RC framework hierarchies.
MountExtension to ensure that content with nested LithoViews is properly clearing those LithoViews when the item is unmounted. Since this should only happen when unmounting an item and not when it's being updated, shouldUpdateItem is not overridden (defaulting to super implementation which returns false).
A helper class that defines a configurable sizes for Pooling.
Components should implement an event of this type in order to receive callbacks to androidx.core.view.AccessibilityDelegateCompat.onInitializeAccessibilityEvent
Components should implement an event of this type in order to receive callbacks to androidx.core.view.AccessibilityDelegateCompat.onInitializeAccessibilityNodeInfo
Components should implement an event of this type in order to receive callbacks to androidx.core.view.AccessibilityDelegateCompat.onPopulateAccessibilityEvent
Components should implement an event of this type in order to be notified so that they can implement their own accessibility support.
Components should implement an event of this type in order to receive callbacks to androidx.core.view.AccessibilityDelegateCompat.onRequestSendAccessibilityEvent
Components should implement an event of this type in order to receive callbacks to View.AccessibilityDelegate.performAccessibilityAction
Interface defining a result calculated from a TreeFuture that could be interrupted, and therefore be partial (and resumed on the UI thread).
Base class for Kotlin primitive components. This class encapsulates some of the Mount Spec APIs. All Kotlin primitive components must extend this class.
The implicit receiver for PrimitiveComponent.render call.
Reports the text of an RCTextView mounted in a ComponentHost, so the host's TextContent covers primitive text the same way it covers Litho's legacy text drawable.
An Event that is triggered when a component is render complete.
A class that represents the trigger type of the render call.
The result of a Component#render call. This will be the Component this component rendered to, potentially as well as other non-Component metadata that resulted from that call, such as transitions that should be applied.
Identifies the render phase in which a hook executes.
Keeps track of the last mounted @Prop/@State a component was rendered with for components that care about them (currently, this is just for ComponentSpecs that use Diff's of props in any of their lifecycle methods).
Class that handles generation of unique IDs for RenderUnits for a given ComponentTree. The ID generation uses the component key to create an ID, and creates unique IDs for any components under the same ComponentTree.
The receiver for KComponent methods which need to access resources and widgets like Row, Column, and Text. This class exposes the ability to access functions defined in Resources like stringRes/drawableRes etc.
Takes a component and returns a new component that it is wrapped in. Used to create a common root wrapper in ComponentTree.
A Component that renders its children in a row.
Migration scaffolding: a typealias for the legacy SpecGen Row class under a non-colliding name.
Converts a value to and from a representation supported by Android saved state.
Components should implement an event of this type in order to receive callbacks to androidx.core.view.AccessibilityDelegateCompat.sendAccessibilityEvent
Components should implement an event of this type in order to receive callbacks to androidx.core.view.AccessibilityDelegateCompat.sendAccessibilityEventUnchecked
LithoVisibilityEventsController implementation that can be used to subscribe a nested ComponentTree to listen to state changes of the lifecycle provider that the parent ComponentTree is also subscribed to.
Implemented by the class used to store state within both Components and Sections to store state.
Holds information about the current State of the components in a Component Tree.
StateUpdater lets a Component rendered with a scoped ComponentContext interact with Litho's state. An implementation of StateUpdater is responsible for collecting state update operations and schedule a new Resolve/Layout step to occur. The default implementation of StateUpdater is ComponentTree, but it might be useful to implement this interface when integrating Litho in different rendering frameworks where it's not desirable for Litho to control the resolve/layout/commit process.
StateUpdaterDelegator is responsible for holding reference to the right StateUpdater that will be used during creation of ComponentTree
Used to represent the value of a Component's State. Must be used to pass State as parameter in methods annotated with @OnUpdateState.
Wraps a full concatenated string key (current behavior). Used for all keys when the config flag is off (legacy/control path). Has no parent pointer -- structural traversal is not possible.
Backwards compatibility to allow Java code to define Styles used by Kotlin components
An interface for a View which supports setting and unsetting its transform pivot, even on pre-API 28 (P) devices.
A Component that wraps another component for testing purposes. This component has a lifecycle that doesn't override any methods except for isEquivalentTo().
Test implementation of ComponentScope used for testing purposes. Provides a test-specific context for component operations.
Holds information about a TestOutput.
This should be only used with the deprecated DiffNode based testing infrastructure. This class hosts a test implementation of create and resolve layout. The implementation only resolves the immediate subcomponents of the component. The implementation details of this class should be kept in sync with LayoutState if the existing tests written with the deprecated testing infrastructure are relevant.
Stores information about a Component which is only available when tests are run. TestOutputs are calculated in LayoutState and transformed into TestItems while mounting.
An UI Element that contains textual content. This element can have more than one textual content. For example, one Mountable wrapping a complex custom view can have multiple text views, and therefore, multiple TextContent.Item
ThreadTracingRunnable tries to help debugging crashes happening across threads showing the stacktrace of the crash origin which scheduled this runnable.
Thread assertion utilities.
Specify a position to anchor a DeprecatedLithoTooltip on a component.
Any interface for mounted items that need to capture motion events from its ComponentHost.
Components should implement an event of this type in order to receive Android touch events. The method is equivalent to the Android method View.onTouchEvent - implementations should return true if they consumed the event and wish to receive subsequent events, and false otherwise. An example of the correct usage is:
Compound touch delegate that forward touch events to recyclable inner touch delegates.
Base class that wraps a FutureTask to allow calculating the same result across threads.
A data structure to store tree props.
Defines a single tree prop override. Unlike ClassValuePair there can be multiple TreePropValuePair with the same corresponding class.
Interface for the onUnbindDynamic function: use onUnbindDynamic to define the cleanup function for your dynamic values.
A component that can wrap a view using a ViewBinder class to bind the view and a ViewCreator to create the mount contents. This component will have a different recycle pool per ViewCreator instance.
Components should implement an event of this type in order to be notified when keyboard focus changes on any virtual views implemented.
A container that stores working range related information. It provides two major methods: a register method to store a working range with a component, and a dispatch method that dispatches event to components to trigger their delegated methods.
A handler that stores the range status of components with given working range.
Utility class for wrapping an existing Component. This is useful for adding further CommonProps to an already created component.
A wrapper around YogaNode that implements LithoLayoutOutput, which will be used internally by LithoYogaLayoutFunction.
Properties
Extension property to get the layout version from LayoutScope.
Hosts API to debug state
Functions
Wraps this existing ComponentContext in a ResourcesScope, for calling the ResourcesScope DSL (Row, Column, widgets such as Card) from code that already holds a ComponentContext but has no ambient ComponentScope — e.g. a @LayoutSpec helper or a builder-style function.
Resolve a dimen resource ID as a Dimen value.
Retrieve a android.graphics.drawable.Drawable, corresponding to an attribute resource ID, as a Drawable instance. If given attribute ID can not be found, default Drawable resource ID defResId is used.
Return a android.graphics.drawable.Drawable for a ColorInt value as a Drawable instance.
Retrieve a android.graphics.drawable.Drawable for a resource ID as a Drawable instance.
Creates a result handler. A callback exception goes to componentContext's error handler and the dispatch returns null; without a context, the exception propagates to the caller.
Returns the thread-safe Litho ViewModel store retained by this AndroidX owner.
Returns the instance registered for the type T in this hierarchy, and null if no value was registered. Tree props are registered for a sub-hierarchy via TreePropProvider or com.facebook.litho.annotations.OnCreateTreeProp in the Spec API.
Backwards compatibility for a Kotlin Component to accept a Style and apply it to a Java Spec Component. Using this builder method is the equivalent of setting all common props the Style defines.
Creates a lazily initialized saveable-state scope owned by this Activity.
Creates a lazily initialized saveable-state scope owned by this Fragment.
Retrieve a android.graphics.drawable.Drawable for a resource ID as a Drawable instance, or null if the resource ID is zero or null.
Same as TreePropProvider, but accepts a lambda that may return a nullable component, in which case it'll return null itself.
Defines a cleanup function to be invoked when the owning Component is detached or the deps in useEffect change.
Utility for preloading classes that should be loaded early but may not be accessible outside of Litho.
Returns the instance registered for the type T in this hierarchy, throws if no value was registered. Tree props are registered for a sub-hierarchy via TreePropProvider or com.facebook.litho.annotations.OnCreateTreeProp in the Spec API.
Creates a standalone ResourcesScope from a plain Android Context, for building a detached component tree outside a KComponent.render / ComponentScope — e.g. a dialog or bottom sheet constructed from a click handler. Prefer the ambient ComponentScope whenever one is available; this is a compatibility escape hatch, hence the Compat suffix.
Return a string for an attribute resource ID.
Return a string for a resource ID.
Return a string for a resource ID, substituting the format arguments with arg.
Return a string for a resource ID, substituting the format arguments with formatArgs.
A component which provides one or more TreeProp values to the given child hierarchy. A tree prop is a mapping from a TreeProp key object to an value of a corresponding type which is accessible throughout the entire subtree where it's defined.
A component which provides one or more tree props to the given child hierarchy. A tree prop is a mapping from a type to an instance of that type which is accessible throughout the entire subtree where it's defined.
Create a CachedValue variable within a Component. The calculator will provide the calculated value if it hasn't already been calculated or if the inputs have changed since the previous calculation.
useCallback allows a parent to pass a child component a callback which: 1) maintains referential equality across multiple layout passes 2) is updated to have the latest parent props and state, even if the child doesn't re-render.
1-parameter overload of useCallback: refer to docs there.
2-parameter overload of useCallback: refer to docs there.
3-parameter overload of useCallback: refer to docs there.
4-parameter overload of useCallback: refer to docs there.
5-parameter overload of useCallback: refer to docs there.
6-parameter overload of useCallback: refer to docs there.
7-parameter overload of useCallback: refer to docs there.
Registers a callback to perform side-effects when this Component is attached/detached from the tree.
Registers a callback to perform error handling for exceptions that might happen in child components down in the tree.
This hook creates a set of references, one for each focusable component that can be used for changing the default focus order. Use with Style.focusOrder
Declares a mutable, main-thread confined reference that will be persisted across renders with an initial value provided by the initializer. It's similar to useState, except that the returned reference is mutable and updating it will not cause a re-render.
Declares component state that can be restored by a lifecycle-backed host.
Declares a state within a Component. The initializer will be invoked to provide the initial value of state. The initializer will be invoked again if the deps change when the Component is rendered again.
Declares a ViewModel scoped to the store supplied by the tree's host. Root trees supply a LithoViewModelStore through ComponentTree.Builder.withLithoViewModelStore, while nested trees receive their current inherited store through TreeProps.
Gives every hook called by block an identity nested under key. Use this when the same source hook call renders several logical items whose order can change. The key must be immutable, stable across renders, and unique among invocations of this withNewScope call site under the same parent scope. Duplicate sibling keys are reported and disambiguated by their order. Two different call sites may use the same key without colliding.
Supplies the lifecycle-backed scope used by useSaveableState in this tree.