Enabling Reconciliation
info
Reconciliation is enabled by default.
caution
Before proceeding, please remove the use of the following deprecated APIs in your surface.
// Remove use of
LithoView#create(Context, Component, boolean): LithoView
LithoView#create(ComponentContext, Component, boolean): LithoView
LithoView#setComponentWithoutReconciliation(Component): void
LithoView#setComponentAsyncWithoutReconciliation(Component): void
// Instead use
LithoView#create(Context, Component): LithoView
LithoView#create(ComponentContext, Component): LithoView
LithoView#setComponent(Component): void
LithoView#setComponentAsync(Component): void
ComponentTreeβ
The ComponentTree
builder exposes an API to enable or disable reconciliation:
ComponentTree.create(context)
.isReconciliationEnabled(true)
.build();
note
In this integration, the config is not passed into any Sections within the component hierarchy. It needs to be explicitly set in the Sections (see below). There are plans to enable propagation over the Section boundary in future milestones.
RecyclerCollectionComponentβ
The RecyclerBinderConfiguration
and the RecyclerBinder
builders both expose an API to enable or disable reconciliation:
RecyclerBinderConfiguration.create()
.recyclerBinderConfig(RecyclerBinderConfig.create().reconciliationEnabled(false).build())
.build();
RecyclerBinderConfiguration.create()
.recyclerBinderConfig(RecyclerBinderConfig(reconciliationEnabled = false))
.build();
new RecyclerBinder.Builder()
.recyclerBinderConfig(RecyclerBinderConfig.create().reconciliationEnabled(true).build())
.build(context);
new RecyclerBinder.Builder()
.recyclerBinderConfig(RecyclerBinderConfig(reconciliationEnabled = true))
.build(context);
Sectionsβ
The ComponentRenderInfo
builder exposes an API to enable or disable reconciliation for individual Sections in a GroupSectionSpec
:
ComponentRenderInfo.create()
.component(component)
.customAttribute(ComponentRenderInfo.RECONCILIATION_ENABLED, false)
.build();