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__
totrue
inlynx.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 withunmountRecycled
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 whenundefined
is passed as an attribute value to intrinsic elements, for example: (#1318)<image async-mode={undefined} />;