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

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...
one month ago

Patch Changes

  • Optimize componentAtIndex by a few hundreds microseconds: avoiding manipulate __pendingListUpdates unless SnapshotInstance tree is changed (#1201)

  • Support alog of component rendering on production for better error reporting. Enable it by using REACT_ALOG=true rspeedy dev/build or defining __ALOG__ to true in lynx.config.js: (#1164)

    export default defineConfig({
      // ...
      source: {
        define: {
          __ALOG__: true,
        },
      },
    });
  • Make preact/debug work with @lynx-js/react. (#1222)

  • Introduce @lynx-js/react/debug which would include debugging warnings and error messages for common mistakes found. (#1250)

    Add the import to @lynx-js/react/debug at the first line of the entry:

    import '@lynx-js/react/debug';
    import { root } from '@lynx-js/react';
    
    import { App } from './App.jsx';
    
    root.render(<App />);
  • <list-item/> deferred now accepts an object with unmountRecycled property to control unmounting behavior when the item is recycled. (#1302)

    For example, you can use it like this:

    <list-item defer={{ unmountRecycled: true }} item-key='1'>
      <WillBeUnmountIfRecycled />
    </list-item>;

    Now the component will be unmounted when it is recycled, which can help with performance in certain scenarios.

  • Avoid some unexpected __SetAttribute in hydrate when undefined is passed as an attribute value to intrinsic elements, for example: (#1318)

    <image async-mode={undefined} />;

Don't miss a new lynx-stack release

NewReleases is sending notifications on new releases.