Key changes
Features:
- New shared memory type, Shareable, a building block for Reanimated's Shared Value implementation. See Docs and blogpost for more details.
- feat(Worklets): implement Shareable type by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8673
- Stable C++ API bindings for libraries to use.
- feat(Worklets): stable api bindings for Reanimated by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8996
- New
runOnRuntimeSyncAPI - allows you to schedule a worklet on any Worklet Runtime synchronously. Docs - feat(Worklets):
runOnRuntimeSyncby @skusnierz in https://github.com/software-mansion/react-native-reanimated/pull/8224
- New scheduling APIs,
scheduleOnRuntimeWithId,runOnRuntimeSyncWithId- allows you to schedule worklets on Worklet Runtimes just by knowing their id. Docs - feat(Worklets): dispatch to Worklet Runtimes from id by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8991
- New
runOnRuntimeAsyncAPI - allows you to schedule a worklet on any Worklet Runtime asynchronously and return a promise with the result. Docs - feat: add runOnRuntimeAsync by @riteshshukla04 in https://github.com/software-mansion/react-native-reanimated/pull/8901
- New useful API shorthands for checking current runtime context. Docs
- feat(Worklets): better runtimeKind checking API by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8758
- New Worklets Babel plugin option,
strictGlobal, that prevents accidental captures of variables from global scope in worklets. Docs - feat(Worklets): Babel plugin strict global option by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8857
- You can now schedule worklets on Worklet Runtimes even outside of Bundle Mode, but with some limitations. There are no limitations when using the Bundle Mode.
- feat(Worklets): limited scheduling on worklet runtimes outside of bundle mode by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9092
Bundle mode improvements:
- You no longer need to patch React Native to use Bundle Mode, meaning that you can use pre-built React Native for faster compilation.
- feat(Worklets): run Bundle Mode without patches to React Native by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8744
- You no longer need to re-compile Worklets when switching between Bundle Mode and non-Bundle Mode (metro cache reset is still required).
- feat(Worklets): always compile bundle mode symbols by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9064
- (experimental) You can now run network request in Bundle Mode Docs
- feat(Worklets): Worklet Runtime ios fetch by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8410
- feat(Worklets): android fetch by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8850
Docs:
- Documentation explaining what are closures in context of worklets, how they work and how to use them. Docs
- feat(Worklets): docs about closures by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8889
Other changes
- chore: modernize build.gradle scripts by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8707
- chore(Worklets): Bundle Mode patches for 0.83.0 by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8737
- fix: prefab headers locations by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8747
- fix(Worklets): Add HERMES_V1_ENABLED flag to iOS podspec for Hermes V1 compatibility by @kimchi-developer in https://github.com/software-mansion/react-native-reanimated/pull/8754
- feat(Worklets): docs for plugin types by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8633
- fix(Worklets): missing sideEffects property by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8760
- chore(Worklets): cleanup metro overrides for bundle mode by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8851
- refactor(Worklets): obtain BundleMode flag from static feature flags by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8853
- refactor(Worklets): dont use @react-native/babel-preset for unit tests by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8862
- fix(Worklets): Synchronizable serialization for objects outside of Bundle Mode by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8887
- chore(Worklets): rename __generatedWorklets dir by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8894
- feat(Worklets): docs for new bundle mode by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8759
- fix(Worklets): false-positive inlineStyles warning on computed [value] by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8897
- fix: Simplify run-loop and always attach JNI on Android by @mrousavy in https://github.com/software-mansion/react-native-reanimated/pull/8905
- Fix bundle mode on windows by @OrfeasZ in https://github.com/software-mansion/react-native-reanimated/pull/8910
- fix(worklets): avoid HERMES_V1_ENABLED macro redefinition on RN 0.84+ by @kimchi-developer in https://github.com/software-mansion/react-native-reanimated/pull/8908
- chore(Worklets): fix runAsync mock signature by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8916
- refactor(Worklets): move serializable factories by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8560
- feat: docs for runOnRuntimeAsync by @riteshshukla04 in https://github.com/software-mansion/react-native-reanimated/pull/8911
- fix: sidebar title of runtimeAsync by @riteshshukla04 in https://github.com/software-mansion/react-native-reanimated/pull/8921
- docs(Worklets): add gtm by @p-malecki in https://github.com/software-mansion/react-native-reanimated/pull/8937
- docs: add gtm by @p-malecki in https://github.com/software-mansion/react-native-reanimated/pull/8936
- Remove workaround for dynamic frameworks by @tomekzaw in https://github.com/software-mansion/react-native-reanimated/pull/8927
- chore(Worklets): compatibility docs by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8971
- fix: free __cxa_demangle allocations in SingleInstanceChecker by @jingjing2222 in https://github.com/software-mansion/react-native-reanimated/pull/8964
- fix(Worklets): pulling native implementation for Jest tests by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8988
- chore(Worklets): cleanup dispatch functions and tests by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9006
- [docs] Fix scheduleOnRN call to remove extra invocation by @piaskowyk in https://github.com/software-mansion/react-native-reanimated/pull/9017
- refactor(Worklets): always spin AnimationFrameQueue by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8900
- fix: Fix native
matchVersionnot allowing patch version mismatches by @kitten in https://github.com/software-mansion/react-native-reanimated/pull/9018 - chore(Worklets): install serializer on UI Runtime by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9024
- chore(Worklets): merge isSynchronizable impl by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9027
- chore(Worklets): stabilize Serializable enum by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9025
- chore(Worklets): add RuntimeId type alias by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9026
- chore(Worklets): export unpackers in prod env by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9029
- fix: Reanimated synchronous events by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9057
- chore(Worklets): update createWorkletRuntime docs by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9030
- fix(Worklets): cascade raf callbacks with reanimated by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9080
- feat: stable API versioning checks by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9105
- feat: Reanimated x Worklets compilation compatibility CI by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/8997
- fix(Worklets): remote function re-serialization by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9115
- chore(Worklets): update algolia keys by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9128
- release(Worklets): 0.8.0 by @tjzel in https://github.com/software-mansion/react-native-reanimated/pull/9131
New Contributors
- @maxpotemkin made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8738
- @kimchi-developer made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8754
- @choi138 made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8733
- @p-malecki made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8793
- @roitium made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8821
- @patrickmichalik made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8794
- @radoslawrolka made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8831
- @huextrat made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8846
- @DouweBos made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8841
- @msynowski made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8878
- @5ZYSZ3K made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8869
- @riteshshukla04 made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8901
- @OrfeasZ made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8910
- @CDFN made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8976
- @AlexRixten made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8978
- @jingjing2222 made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8964
- @aljadan made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/8995
- @kitten made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/9018
- @YevheniiKotyrlo made their first contribution in https://github.com/software-mansion/react-native-reanimated/pull/9055
Full Changelog: https://github.com/software-mansion/react-native-reanimated/compare/worklets-0.7.0...worklets-0.8.0