github lynx-family/lynx-stack @lynx-js/react@0.111.0

latest releases: @lynx-js/offscreen-document@0.1.4, @lynx-js/cache-events-webpack-plugin@0.0.2, @lynx-js/web-constants@0.16.0...
2 months ago

Minor Changes

  • Allow some <list-item/>s to be deferred and rendered in the background thread. (#204)

    Use the following syntax:

    <list>
    -  <list-item item-key="...">
    +  <list-item item-key="..." defer>
          <SomeHeavyComponent />
      </list-item>
    </list>

    You should render your heavyweight components with the defer attribute to avoid blocking the main thread.

Patch Changes

  • Add missing alias of @lynx-js/react and preact in testing library, it will fix the Failed to resolve import "@lynx-js/react/internal" error in node_modules. (#1182)

  • Allow any types of dataProcessors in lynx.registerDataProcessors. (#1200)

  • Make loadLazyBundle being able to render the content on the first screen of the background thread. (#1212)

  • Fixed: An issue where the lynxViewDidUpdate callback did not trigger when data was updated from native. (#1171)

    Notice:

    • Even if no data changes are actually processed after calling updateData(), the lynxViewDidUpdate callback will still be triggered.
    • Only one lynxViewDidUpdate callback will be triggered per render cycle. Consequently, if multiple updateData() calls are made within a single cycle but the data updates are batched, the number of lynxViewDidUpdate callbacks triggered may be less than the number of updateData() calls.
  • Supports act in testing library. (#1182)

    import { act } from '@lynx-js/react/testing-library';
    
    act(() => {
      // ...
    });

Don't miss a new lynx-stack release

NewReleases is sending notifications on new releases.