Skip to content

Commit d3186b2

Browse files
authored
Update README.md
1 parent 221c02b commit d3186b2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,13 @@ console.log(`Fibonacci Result: ${result}`)
100100

101101
## What's possible?
102102

103+
* You can run any JavaScript code you want in there.
103104
* 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))
105109
* 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.
108110

109111
## What's not possible?
110112

0 commit comments

Comments
 (0)