addCustomBinders

fun addCustomBinders(delegateBindersMap: Map<Class<*>, RenderUnit.DelegateBinder<Any, Any, Any>>? = null)

The goal of this method is to add the optional mount binders to the associated to this LithoNode. If we are dealing with a Primitive, we will get the corresponding LithoNode and associate the binders map as optional mount binders. For this reason, this method should be called as soon as their RenderUnit is created. In Litho, this happens in the Resolve phase, specifically when the mount content preparation is invoked.

For MountSpecLithoRenderUnit (e.g., the node is associated with a MountSpec, or the Primitive mounts a Drawable and, therefore will need to be wrapped in a ComponentHost to work with the view binders), the addition of the optional mount binders is delayed until the moment of its creation. For that, we store these binders in the LithoNode and use them later.