Litho (By Facebook) v0.40.1-SNAPSHOT Release Notes
-
๐ release-date
- Breaking: Remove
@OnShouldCreateLayoutWithNewSizeSpec
API. We hope to provide replacements for it in the future, please let us know if you were relying on it. - Breaking: Add new
ComponentTree
parameter toErrorEventHandler.onError()
method. - Breaking: Add UI thread call assertion to
ComponentTree.release()
method. - Breaking: Make
getErrorHandler
,getHandle
,getId
, andgetKey
package-private forComponent
andSection
. This is for compatibility with the Kotlin API. - Breaking: Make most
Component
/ComponentLifecycle
non-lifecycle methods (e.g.onCreateLayout
,onMount
, etc) final as they are not meant to be overridden. - Breaking: Remove
checkNeedsRemeasure
,useVisibilityExtension
,useInternalNodesForLayoutDiffing
,hostHasOverlappingRendering
,inheritPriorityFromUiThread
,interruptUseCurrentLayoutSource
,ignoreDuplicateTransitionKeysInLayout
,onlyProcessAutogeneratedTransitionIdsWhenNecessary
,ignoreStateUpdatesForScreenshotTest
,computeRangeOnSyncLayout
andthreadPoolForBackgroundThreadsConfig
configuration parameters fromComponentsConfiguration
. These configs were used for experimentation and respective experiments were successfully shipped and therefore they are no longer needed. - Breaking: Remove stale
ThreadPoolDynamicPriorityLayoutHandler
andLayoutPriorityThreadPoolExecutor
classes. - Breaking: Rename
LithoHandler
toRunnableHandler
andDefaultLithoHandler
toDefaultHandler
. - Breaking: Move
RunnableHandler
,FutureInstrumenter
, andHandlerInstrumenter
to core RenderCore artifact. - New: Almost all lifecycle methods are now covered by the
@OnError
lifecycle API. It's encouraged that high-level Specs implement@OnError
callbacks in order to gracefully handle errors that may arise in their descendant Specs. - Breaking:
Component
andComponentLifecycle
are now merged as one class (Component
).ComponentLifecycle
is now removed. AnywhereComponentLifecycle
was directly referenced should be changed toComponent
. Generated components now extendSpecGeneratedComponent
which extendsComponent
.- onCreateLayout/onCreateLayoutWithSizeSpec have been moved to SpecGeneratedComponent. Direct subclasses of Component should implement render() instead.
- New: Allow passing
@TreeProp
to@OnCalculateCachedValue
methods - Breaking: Deletes
@FromBind
inter stage prop. Replace existing usages with@State AtomicReference<?>
instead. Create a@State AtomicReference<?>
for theComponent
; set that value for theAtomicReference
in@OnBind
, and get from it in@OnUnbind
or other lifecycle methods. - Breaking: Add
ComponentTree
inHandle
so thatHandle
can be used across component trees. Remove static references ofHandle
as that can lead to memory leaks since it hold reference toComponentTree
now, insteadHandle
should be used via@State
oruseState
in Kotlin.
๐ For more details, see the full diff.
- Breaking: Remove