You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* You can run any JavaScript code you want in there.
103
104
* You can use variables from "outside" (e.g. state), but those will be immutable/frozen.
104
-
* You can use functions from "outside". If they also contain the `'worklet'` directive they can be called synchronously, otherwise they have to be dispatched to the JS thread by using `runOnJS`.
105
+
* You can use functions from "outside".
106
+
- Worklets (functions with the `'worklet'` directive) can be called synchronously
107
+
- Normal JS functions (e.g. setState) can be called with `runOnJS`
108
+
- Native JSI functions ("host functions") can be called synchronously (e.g. functions from [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv#usage))
105
109
* You can assign Reanimated Shared Values.
106
-
* You can call native JSI functions ("Host Functions") from a JSI library, e.g. every function [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv#usage) provides.
107
-
* You can asynchronously dispatch calls to functions from "outside" using `runOnJS` from react-native-reanimated.
0 commit comments