Patch Changes
-
Support NPM provenance. (#30)
-
feat: add compiler only version of addComponentElement, it does not support spread props but have no runtime overhead, use it by: (#15)
pluginReactLynx({ compat: { addComponentElement: { compilerOnly: true, }, }, });
-
Fix error
createRef is not a function
(#16) -
Support
MIXED
target for worklet, it will be used by unit testing frameworks, etc. (#27) -
Support return value for
runOnBackground()
andrunOnMainThread()
. (#119)Now you can get the return value from
runOnBackground()
andrunOnMainThread()
, which enables more flexible data flow between the main thread and the background thread.import { runOnBackground } from '@lynx-js/react'; const onTap = async () => { 'main thread'; const text = await runOnBackground(() => { 'background only'; return 'Hello, world!'; })(); console.log(text); };