ComponentUtils
Functions
Utility to dispatch an error event to a component. To be used by the generated component.
Utility to dispatch an unhandled exception to a component. To be used by the framework.
Utility to get a component to handle an exception gracefully outside the layout phase. If the component re-raises the exception using raise(ComponentContext, Exception) then the utility will rethrow the exception out of Litho.
Utility to get a component to handle an exception gracefully during the layout phase when dealing with component hierarchy.
Given two object instances of the same type, this method accesses all their internal fields, to check if they are equivalent. There's special equality code to handle special class types e.g. Components, EventHandlers, etc. Components are considered equivalent if they have the same props.
Given two components this method accesses all their internal fields, excluding the fields of StateContainer if the class type is a Component, to check if they are equivalent. There's special equality code to handle special class types e.g. Components, EventHandlers, etc.
Calculate the level of the target Component/Section. The level here means how many bracket pairs are needed to break until reaching the component type. For example, the level of List
Reraise an error event up the hierarchy so it can be caught by another component, or reach the root and cause the application to crash.
Uses the given ComponentTree to add metadata to a wrapper exception (if the wrapper doesn't already exist) and return it.
Uses the given ComponentContext to add metadata to a wrapper exception (if the wrapper doesn't already exist) and return it.