Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Changelog

Version 0.46.0-SNAPSHOT

release-date

  • TBA

For more details, see the full diff.

Version 0.45.0

2022-12-02

  • Many internals changes which should not affect end-users: StateContainers are now immutable and added support for testing split of resolve and layout processes
  • Fix for bug where some EventHandlers would be stale after updates when using sections
  • SimpleMountable API is stabilized and ready to replace @MountSpec usages in Kotlin. See here for the docs!

For more details, see the full diff.

Version 0.44.0

2022-10-27

  • New APIs for debugging.
  • Breaking: ComponentContext.withComponentScope is now package-private: it was @VisibleForTesting before, but we are now enforcing the privacy. If you were using it in tests, you can replace it with ComponentTestHelper.createScopedComponentContextWithStateForTest (however you should really write tests against LithoViewRule for kt tests and LegacyLithoViewRule for java tests)

For more details, see the full diff.

Version 0.43.0

2022-10-21

  • Breaking:: If you use ComponentsSystrace.provide to provide a custom Systrace implementation, there have been some changes to the types and methods involved:
    • Instead of implementing ComponentsSystrace.Systrace, implementations should implement com.facebook.rendercore.Systracer, located in litho-rendercore. The ArgsBuilder interface has also moved from ComponentsSystrace to the Systracer interface.
    • Some method names have been corrected. Specifically start/endSectionAsync have become start/endAsyncSection, aligning them to the Tracer API.
  • We have implemented a mechanism that allows us to batch state updates with a deterministic approach. This mechanism enqueues state updates until the next Choreographer Frame Callback (precisely the next "anim" step) and only then schedules the following layout calculation. For more details, see the full diff.

Version 0.42.0

2022-08-15

  • Breaking: There are some changes to how we store ComponentContext and HasEventDispatcher on EventHandler - these changes only affect manually-constructed EventHandlers and will present as a compile error. They don't affect ones generated by the annotation processor for @OnEvent:
    • Previously the ComponentContext was stored as param[0]. It's now stored on eventDispatchInfo.componentContext and all other params should be shifted by one (so index 1 is now index 0) - you only need to do anything here if you were manually constructing EventHandlers - generated EventHandlers from @OnEvent are automatically updated.
    • Previously the HasEventDispatcher was stored directly on the EventHandler. It's not stored at eventDispatchInfo.hasEventDispatcher. This is also automatically updated for generated EventHandlers.
  • Breaking: com.facebook.litho.widget.EmptyComponentSpec is removed. Construct a com.facebook.litho.EmptyComponent directly. In places that require a Builder, use Wrapper.create(<context>).delegate(EmptyComponent())
  • Breaking: PoolableContentProvider renamed to ContentAllocator in RenderCore. RenderUnit no longer implements PoolableContentProvider, instead it should return ContentAllocator implementation from getContentAllocator method.
  • Breaking: StateHandler has now been replaced by TreeState in ComponentTree for all state handling. Use ComponentTree.acquireTreeState() and ComponentTree.Builder.treeState(...) to save/restore state across different component trees.

For more details, see the full diff.

Version 0.41.2

2022-04-19

  • Refactor: Rename setRootAndSizeSpec to setRootAndSizeSpecSync in ComponentTree.
  • New: Foreground color is supported as a common DynamicValue.
  • Breaking: Fix: More fully support @PropDefault annotations in Kotlin Specs. (Results in @field:PropDefault failing at compilation time. Use fastmod on existing codebase with the command: fastmod '@field:PropDefault' '@PropDefault' --dir .)
  • Breaking: InternalNode renamed to LithoNode, and elevated to a concrete class. Deletes DefaultInternalNode.
  • Breaking: NodeInfo is now a concrete class; deleted DefaultNodeInfo.
  • Experimental Kotlin Mountable Component API added.
  • Refactored RenderCore MountState extensions call order.

For more details, see the full diff.

Version 0.41.1

2021-11-23

  • Breaking: Rename 'LithoAssertions' to 'LegacyLithoAssertions'. (Use fastmod on existing codebase with the command: fastmod 'LithoAssertions' 'LegacyLithoAssertions' --dir .)
  • Upgrade: Bump Yoga version to 1.19.0.

For more details, see the full diff.

Version 0.41.0

2021-11-18

  • Breaking: Delete @FromBind inter stage prop. Replace existing usages with @State AtomicReference<?> instead. Create a @State AtomicReference<?> for the Component; set that value for the AtomicReference in @OnBind, and get from it in @OnUnbind or other lifecycle methods.
  • Breaking: Add ComponentTree in Handle so that Handle can be used across component trees, i.e. throughout Sections. Remove static references of Handle as that can lead to memory leaks since it holds reference to ComponentTree now, instead Handle should be used via @State in Spec API or useState in Kotlin API.
  • 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 to ErrorEventHandler.onError() method.
  • Breaking: Add UI thread call assertion to ComponentTree.release() method.
  • Breaking: Make getErrorHandler, getHandle, getId, and getKey package-private for Component and Section. 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 and threadPoolForBackgroundThreadsConfig configuration parameters from ComponentsConfiguration. These configs were used for experimentation and respective experiments were successfully shipped and therefore they are no longer needed.
  • Breaking: Remove stale ThreadPoolDynamicPriorityLayoutHandler and LayoutPriorityThreadPoolExecutor classes.
  • Breaking: Rename LithoHandler to RunnableHandler and DefaultLithoHandler to DefaultHandler.
  • Breaking: Move RunnableHandler, FutureInstrumenter, and HandlerInstrumenter to core RenderCore artifact.
  • Breaking: Component and ComponentLifecycle are now merged as one class (Component). ComponentLifecycle is now removed. Anywhere ComponentLifecycle was directly referenced should be changed to Component. Generated components now extend SpecGeneratedComponent which extends Component.
    • onCreateLayout/onCreateLayoutWithSizeSpec methods have been moved to SpecGeneratedComponent
    • Direct subclasses of Component should implement render method instead
  • 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.
  • New: Allow passing @TreeProp to @OnCalculateCachedValue methods

For more details, see the full diff.

Version 0.40.0

2021-02-26

  • Breaking: Change the return type of ComponentLifecycle.resolve() from ComponentLayout to InternalNode.
  • New: Expose visibleTop and visibleLeft fields from the VisibilityChangedEvent to better understand which side of the component is hidden. Check out VisibilityChangedEvent's javadoc for more info.
  • New: Expose mounted content from the VisibleEvent.
  • New: Lifecycle arguments are now optional in the spec. (e.g. ComponentContext is now optional in @OnCreateInitialState)

For more details, see the full diff.

Version 0.39.0

2020-10-07

  • Breaking: Component.getScopedContext() access changed from public to package-private.

For more details, see the full diff.

Version 0.38.0

2020-09-17

  • New: ComponentLifecycle.dispatchErrorEvent(ComponentContext, Exception) has become deprecated for public use. Instead, use ComponentUtils.raise(ComponentContext, Exception).

For more details, see the full diff.

Version 0.37.1

2020-07-24

  • Breaking: Ignore mount calls after setVisibilityHint(false) was called on a LithoView until setVisibilityHint(true) is called. For more details see the docs about changing LithoView visibility.
  • New: Add LithoGestureDetector wrapper class that ensures gestures are processed on UI thread.

For more details, see the full diff.

Version 0.37.0

2020-07-07

  • Breaking: TransparencyEnabledCard is deprecated Moved the behavior of TransparencyEnabledCard into Card when the prop transparencyEnabled is true. Please migrate your current uses because it will be removed in a few releases.
  • New: Add .duplicateChildrenStates(boolean) method to Component which passes the flag to ViewGroup#setAddStatesFromChildren(boolean). When this flag is set to true, the component applies all of its children's drawable states (focused, pressed, etc.) to itself.
  • New: Ability to specify the percentage of Component's width/height which should be visible to trigger Visible events. Read more in the documentation.
  • Fix: Fix showing vertical scrollbar with VerticalScrollSpec. Default behaviour is scrollbars disabled.

For more details, see the full diff.

Version 0.36.0

2020-06-01

  • Breaking: Remove unused obsolete RenderThreadTransition.
  • Breaking: Ordering of params in @ShouldUpdate callback is fixed (getNext() was previous and getPrevious() was next).
  • Breaking: Rename ComponentsTestRunner to LithoTestRunner.
  • New: Add TransitionEndEvent event callback to receive events when a transition ends. Read more about it in the documentation.
  • New: Add acquireStateHandlerOnRelease flag for RecyclerBinder to opt out of caching StateHandlers.
  • New: Improved testing APIs: MountSpecLifecycleTester, LifecycleTracker to track basic lifecycle methods which would replace custom component implementations like TestDrawable, TestComponent, etc.
  • Fix: Ensure @OnAttached and @OnDetached methods are called in the same order.
  • Fix: Remove overriding isLayoutRequested() in SectionsRecyclerView.
  • Fix: Deprecate and ignore ShouldUpdate#onMount param. MountSpecs with pureRender will now always check shouldUpdate on the main thread if the information from layout isn't able to be used.
  • Fix: Fixup BackgroundLayoutLooperRule and improve threading APIs in ComponentTreeTest.
  • Fix: Fix incorrect key generation after shallow copy.
  • Fix: Remove host invalidation suppression during mount.
  • Fix: Move setting PTRRefreshEvent from onPrepare to onBind in RecyclerSpec.

For more details, see the full diff.

Version 0.35.0

2020-05-01

  • Experimental: Process Visibility events without Incremental Mount turned on. If you used Incremental Mount only for Visibility events before, now you can turn it off!
  • Breaking: LayoutInfo implementations are required to implement scrollToPositionWithOffset(). To avoid special casing for LinearLayoutManager and StaggeredGridLayoutManager in RecyclerBinder and other internal logic, a LayoutInfo implementation must now delegate to the underlying LayoutManager's scrolling by implementing scrollToPositionWithOffset(). Typical cases should call the LayoutManager's own implementation of scrollToPositionWithOffset(), or an equivalent. This creates a common interface for programmatic scrolling a61e409.
  • Breaking: MeasureListener now takes two extra parameters, layoutVersion and stateUpdate. These are safe to ignore for clients that don't need them. Check javadoc for all the relevant information.
  • Breaking: Rename LithoView.performIncrementalMount() method to LithoView.notifyVisibleBoundsChanged().
  • Breaking: Rename getShadowHorizontal() to getShadowLeft() in CardShadowDrawable.
  • New: @OnCreateInitialState method in Specs is now guaranteed to be called only once.
  • New: Add ability to customize shadowDx/shadowDy offsets for CardShadowDrawable and CardShadowSpec.
  • New: Add more Animations examples and Animations Cookbook in the sample app. Check out docs for more info.
  • New: Update accessibility utils to support newer version of Talkback.
  • New: Replace Litho's MountItem with RenderCore's and wrap LayoutOutput with RenderTreeNode.
  • New: Litho tests are now migrated to Robolectric 4 and Mockito 2!
  • New: New testing utilities: LithoViewRule, LithoStatsRule, BackgroundLayoutLooperRule.
  • Fix: Remove 1px white margin between content and shadow for CardSpec 00f2bdb.
  • Fix: Fix Sections not updating layout for sticky items with indices outside range ratio.
  • Fix: Fix RecyclerSpec not respecting RTL for padding.
  • Fix: Add missing @Nullable to every method accepting EventHandler.
  • Fix: Propagate class-level annotations from SectionSpecs class to generated Section class.
  • Fix: Don't crash on missing @OnCreateMountContent method for MountSpecs during code generation.
  • Fix: Don't crash when comparing ComparableGradientDrawables on API<=15.
  • Fix: Fixes a bug in ComponentUtils.isEquivalentTo().
  • Fix: Correctly release ComponentTree on the main thread after @OnDetached.

For more details, see the full diff.

Version 0.34.0

2020-02-09

  • Breaking: Reconciliation for state updates is enabled by default. Reconciliation makes state updates faster at the expense of increase in memory usage. New APIs added to explicitly disable reconciliation when an explicit ComponentTree is not set on the LithoView. Read more about it in the documentation.
    • LithoView.create(Context, Component, boolean)
    • LithoView.create(ComponentContext, Component, boolean)
    • LithoView.setComponentWithoutReconciliation(Component)
    • LithoView.setComponentAsyncWithoutReconciliation(Component)
  • Breaking: Merge BaseLithoStartupLogging abstract class, LithoStartupLoggerUtil helper class and LithoStartupLogger interface into single LithoStartupLogger abstract class.
  • Breaking: Consolidate two layout calculation PerfEvents into one: remove FrameworkLogEvents.EVENT_LAYOUT_CALCULATE and move some of its annotations to FrameworkLogEvents.CALCULATE_LAYOUT_STATE which will be used instead.
  • Breaking: Make varArg props effectively optional with a Collections.EMPTY_LIST as a default value.

For more details, see the full diff.

Version 0.33.0

2019-12-11

  • Breaking: Changes in working with ComparableDrawable. Litho's DrawableWrapper doesn't mimic Android Jetpack's implementations of WrappedDrawable, e.g. WrappedDrawableApi21, etc. Litho's wrapper will have to implement this correctly to have a legitimate chance of working across OS versions and all drawable types. This is not a good position to be in. It is better to remove the wrapper all together; this change doesn't remove it, but blocks usages except for specific internal ones. In essence, if a background or foreground Drawable is also a ComparableDrawable, Litho will invoke the isEquivalentTo() for comparison (instead of equals()). Also, ComparableDrawable is now an optional interface; so non comparable drawables will not be wrapped. The usage remains largely unchanged (except for the removal of Litho's DrawableWrapper implementation).
    • ComparableDrawable is a plain interface now (instead of a Drawable).
    • Remove Component.Builder.background(ComparableDrawable) and Component.Builder.foreground(ComparableDrawable).
    • Remove ComparableResDrawable, ComparableIntIdDrawable and DefaultComparableDrawable implementations.
  • Breaking: Provide global offset of the Section into @OnDataRendered method.
  • Breaking: Fix default text size of TextSpec, EditTextSpec and TextInputSpec to be 14sp (from 13px).
  • Breaking: FBJNI got removed from the build process. If you relied on libfbjni.so to be present, you can get the artifact from the fbjni repository.
  • Breaking: LithoViewAssert.hasVisibleDrawable() no longer relies on the broken ShadowDrawable.equals() implementation in Robolectric 3.X. Now Drawable equality relies on the descriptions being equal, or the resource ID they were created with being equal.
  • Breaking: Remove unused getKeyCollisionStackTraceBlacklist() and getKeyCollisionStackTraceKeywords() from the ComponentsReporter.Reporter interface.
  • New: Allow triggering @OnTrigger Events on Components using a Handle API.
  • Fix: Propagate annotations specified on @Param args from @OnEvent methods to generated methods.
  • Fix: Produce correct generated code for @OnEvent method when it has several args of the same generic type.
  • Fix: Fix generating @OnCalculateCachedValue related methods when it has ComponentContext as a parameter.
  • Fix: Fix IndexOutOfBoundsException in RecyclerBinder.removeItemAt() in Sections when SingleComponentSection is given a null Component.
  • Fix: Support Dynamic Props for LayoutSpecs.

For more details, see the full diff.

Version 0.32.0

2019-11-15

  • Breaking: Make ctors of Component/ComponentLifecycle that take an explicit type id package private.
  • Breaking: Add categoryKey param for ComponentsReporter.emitMessage() API to distribute errors into different buckets.
  • Breaking: Remove ComponentsLogger.emitMessage() API as it was fully replaced by ComponentsReporter.emitMessage().
  • Breaking: Remove YogaNode parameter from YogaLogger.log().
  • Breaking: Remove error reporting from ComponentsLogger.
  • Breaking: Limit scope of Component/ComponentLifecycle constructors that take explicit type param.
  • New: Add requestSmoothScrollBy() and requestScrollToPositionWithSnap() APIs for RecyclerCollectionEventsController.
  • New: Add ability to provide custom ComponentsLogger per ComponentRenderInfo.
  • New: Add new counters (calculateLayout, section state update, section changeset calculation) to LithoStats global counter.
  • New: Allow custom StaggeredGridLayoutInfo when using StaggeredGridRecyclerConfiguration.
  • New: Add support for more textAlignment values for TextSpec.
  • New: Add ComponentWarmer API to allow calculating layout ahead of time.
  • New: Add ThreadPoolDynamicPriorityLayoutHandler to enable changing priority of threads calculating layouts.
  • New: Add varArgs to the generated Component.
  • New: Add snap support for GridRecyclerConfiguration.
  • New: Add support for custom fling offset for StartSnapHelper.
  • New: Allow disabling top or bottom shadow in TransparencyEnabledCardSpec.
  • New: Add Handle API for Litho Tooltips via LithoTooltipController.showTooltipOnHandle() that replaces previous way of anchoring tooltip with concatenated keys.
  • New: Track component hierarchy using DebugHierarchy after mount time.
  • Fix: Add generics support to @OnCalculateCachedValue methods.
  • Fix: Move setting ItemAnimator from onBind/onUnbind to onMount/onUnmount in RecyclerSpec.
  • Fix: Stop and clean running transitions that do not exist and not declared in the new layout.
  • Fix: Fix concurrent modification on finishing undeclared transitions.
  • Fix: Allow TreeProps to be used in @OnCreateInitialState of Sections.
  • Fix: Define default color for spannable link in TextSpec.
  • Fix: Postpone ComponentTree.mountComponent() for reentrant mounts, then mount new LayoutState afterwards.
  • Fix: Enable automatic RTL support in sample apps.

For more details, see the full diff.

Version 0.31.0

2019-09-09

  • Breaking: Component.measure() is only allowed during a LayoutState calculation.
  • New: Add support to FrescoImageSpec for photo focus points.
  • New: Allow Child Classes to set ComponentContext on DefaultInternalNode.
  • Fix: Immediately remove MountItem mapping on unmount to protect against re-entrancy.

For more details, see the full diff.

Version 0.30.0

2019-08-23

  • Breaking: Rename @FromCreateLayout to @FromPreviousCreateLayout.
  • Breaking: Add compile-time error when Component.Builder is passed as a @Prop. (5da7121)
  • Breaking: Remove MountSpec.shouldUseDisplayList() - remnant of removed DisplayLists' usage. Was not doing anything.
  • New: Make DynamicValue.get() public.
  • New: Expose RecyclerBinder's Commit Policy through DynamicConfig. (ac513f3)
  • New: Allow to provide custom GridLayoutInfo (i.e. custom GridLayoutManager) through GridLayoutInfoFactory. (4568d58)
  • New: Allow creating ComponentTree without specifying root.
  • New: Deprecate ComponentsLogger.emitMessage() in favor of ComponentsReporter.Reporter.emitMessage(). (9cb4caf)
  • New: Auto set Text.ellipsize() if maxLines() is specified without an accompanying ellipsize, to make behavior consistent across different Android versions. (3bef059)
  • New: Share the same ResourceResolver across all Components in the same tree. (c93517c, 7656822, dde30dc)
  • New: Add support for A11y headers. (#573)
  • New: Update documentation and javadocs.
  • Fix: Better error messages for releasing mount content.
  • Fix: Don't use internal javac API in codegen. (#577)
  • Fix: Propagate injected treeProps for Layout PerfEvent. (#574)
  • Fix: Don't crash when using primitive @CachedValues together with HotSwap mode. (501f1a1)
  • Fix: Improve @OnUpdateStateWithTransition's behavior.

For more details, see the full diff.

Version 0.29.0

2019-07-11

  • New: Additional Sections debugging APIs:
    • Make Change.getRenderInfos() public.
    • Add ChangesInfo.getAllChanges().
  • Fix: Don't crash on dangling mount content.

For more details, see the full diff.

Version 0.28.0

2019-07-05

  • New: Plain code Codelabs with README instructions. Try them out in codelabs.
  • New: Add interface ChangesetDebugConfiguration.ChangesetDebugListener for listening for ChangeSet generation in Sections.
  • Fix: Cleanup some unused code.

For more details, see the full diff.

Version 0.27.0

2019-06-24

  • Breaking: Change in PerfEvents:
    • Remove FrameworkLogEvents.EVENT_CREATE_LAYOUT, FrameworkLogEvents.EVENT_CSS_LAYOUT , and FrameworkLogEvents.EVENT_COLLECT_RESULTS: these are replaced by the sub-spans "start_create_layout"/"end_create_layout", "start_measure"/"end_measure", and "start_collect_results"/"end_collect_results" under the existing top-level EVENT_CALCULATE_LAYOUT_STATE event. The PerfEvent.markerPoint() API can be used to log these sub-spans. (b859605)
    • Remove FrameworkLogEvents.PREPARE_MOUNT without replacement: this didn't provide much value. (4917370)
    • Remove FrameworkLogEvents.DRAW without replacement: this was not free to maintain and didn't provide much value. (9e548cb)
  • Breaking: The Default Range Ratio for Sections/RecyclerBinder is changed from 4 screens worth of content in either direction to 2. This should improve resource usage with minimal effects on scroll performance. (9b4fe95)
  • Breaking: ComponentsSystrace.provide(): ComponentsSystrace now assumes an implementation will be provided before any other Litho operations occur. (457a20f)
  • New: ComponentsLogger implementations can now return null for event types they don't care about. (4075eb7)
  • New: Add RecyclerCollectionEventsController.requestScrollBy(). (0146857)
  • New: Add preliminary Robolectric v4 support. (4c2f657, etc.)
  • New: More efficient code generation for state updates in Components and Sections. (8c5c7e3, etc.)
  • Fix: Remove usage of API 19+ Objects class in cached value API. (aabb24a)
  • Fix: Unset Components scope when creating a new ComponentContext in ComponentTree. (05f11a7)
  • Fix: Fix perf logging for dirty mounts. (3ad8bfb)
  • Fix: Don't crash when @OnCalculateCachedValue takes no args. (2a0f524)
  • Fix: Reduce number of systrace markers in collectResults: these were skewing the perceived size of LayoutState.collectResults in production and weren't actionable. (3107467)

For more details, see the full diff.

Version 0.26.1

2019-05-28

  • Fix: Picks 513cf91 to fix an issue with the Flipper integration.

Version 0.26.0

2019-05-13

  • Breaking: Fix the lazy State update semantics. (de3d938)
  • Breaking: Rename LayoutHandler to LithoHandler and add DefaultLithoHandler. (h69cba5, 0d0bb0b)
  • Breaking: Update Yoga version to 1.14.0. Fixes #536. (c16baf6)
  • Breaking: Release sections' ComponentTrees when RecyclerCollectionComponent is detached. (8893049)
  • Breaking: Only enable incremental mount if parent incremental mount is enabled. (c88a660)
  • Experimental: Make state updates faster by only recreating the subtrees which are being updated and reuse (read "clone") the untouched subtrees while calculating a new layout. You can try it out by setting ComponentsConfiguration.isReconciliationEnabled() flag globally or using ComponentTree.Builder.isReconciliationEnabled() for specific trees.
  • New: Add a RecyclerBinder.replaceAll(List<RenderInfo>) method. (#451)
  • New: Add documentation.
  • Fix: Eliminate Gradle deprecated methods. (#526)
  • Fix: Cleanup tests and unused code.
  • Fix: Remove object pooling everywhere.
  • Fix: Make Robolectric tests work. (a92018a)

For more details, see the full diff.

Version 0.25.0

2019-03-14

  • Breaking: Migrate support lib dependencies to AndroidX. (de3097b)
  • Breaking: Remove DisplayListDrawable and other DisplayList-related features. (29f42fa)
  • Breaking: Remove References API. (b1aa39a)
  • New: Remove object pooling for most internal objects.
  • New: Replace powermock-reflect with internal Whitebox implementation. (ad899e4)
  • New: Enable Gradle incremental AnnotationProcessing. (a864b5a)
  • New: Allow TextInput to accept null as inputBackground. (d1fd03b)
  • New: Add documentation.
  • Fix: Suppress focus temporarily while mounting. (d93e2e0)
  • Fix: When clearing press state, also cancel pending input events. (451e8b4)
  • Fix: Correctly calculate VisibilityChangedEvent in MountState. (66d65fe)
  • Fix: Thread safety issue of ViewportChanged listeners of ViewportManager. (9da9d90)

For more details, see the full diff.

Version 0.24.0

2019-02-18

Breaking: The default for state updates has changed from sync to async. At Facebook this meant we ran a codemod script on the codebase and changed all state update methods to the explicit Sync variant ("Sync" is just appended to the end of the state update call), then changed the default. The reason for this is to not change existing behavior in case it breaks something, since there are many callsites. The script is committed and available at scripts/codemod-state-update-methods.sh. We recommend using it if you have any concerns about state update calls automatically becoming async. As a reminder, when you add a @OnUpdateState method, it generates three methods: updateState(), updateStateSync(), and updateStateAsync(). Previously updateState() == updateStateSync(). Now, updateState() == updateStateAsync().

For more details, see the full diff.

Version 0.23.0

2019-01-16

  • Breaking: KeyHandlers now get registered in EndToEnd tests (9836497). This is a an edge-case, but potentially behavior-changing.
  • New: Add support for Cached Values.
  • New: isEquivalentTo now uses reflection for size reasons unless the target is a MountSpec or SectionSpec. (2e27d99)
  • Fix: Potential NPE in RecyclerEventsController. (8e29036)

For more details, see the full diff.