Patch Changes
-
Add
event.stopPropagation
andevent.stopImmediatePropagation
in MTS, to help with event propagation control (#1835)function App() { function handleInnerTap(event: MainThread.TouchEvent) { 'main thread'; event.stopPropagation(); // Or stop immediate propagation with // event.stopImmediatePropagation(); } // OuterTap will not be triggered return ( <view main-thread:bindtap={handleOuterTap}> <view main-thread:bindtap={handleInnerTap}> <text>Hello, world</text> </view> </view> ); }
Note, if this feature is used in Lazy Loading Standalone Project, both the Producer and the Consumer should update to latest version of
@lynx-js/react
to make sure the feature is available. -
Fix the "ReferenceError: Node is not defined" error. (#1850)
This error would happen when upgrading to
@testing-library/jest-dom
v6.9.0. -
fix: optimize main thread event error message (#1838)