Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed May 21, 2024
1 parent a046b9f commit 5faaa18
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ context1.runAsync(() => {

## Integration

To integrate react-native-worklets-core in your library, first install the package:
To integrate react-native-worklets-core in your library, first add the dependency:

### Dependency Installation

Expand All @@ -139,11 +139,7 @@ To integrate react-native-worklets-core in your library, first install the packa

#### Android:

1. Add `react-native-worklets-core` to your `build.gradle`:
```groovy
implementation project(":react-native-worklets-core")
```
2. Add `react-native-worklets-core` to your `CMakeLists.txt`:
1. Add `react-native-worklets-core` to your `CMakeLists.txt`:
```CMake
find_package(react-native-worklets-core REQUIRED CONFIG)
Expand All @@ -156,14 +152,17 @@ To integrate react-native-worklets-core in your library, first install the packa
)
```

> [!NOTE]
> The user is still required to install react-native-worklets-core in their app.

Then, from C++ you can convert Functions to Worklets and call them on any Thread:

### Usage

1. Include the Headers:
```cpp
#include <JsiWorkletContext.h>
#include <JsiWorklet.h>
#include <WKTJsiWorkletContext.h>
#include <WKTJsiWorklet.h>
```
2. On the main JavaScript Thread (`mqt_js`), create your Worklet Context:
```cpp
Expand Down

0 comments on commit 5faaa18

Please sign in to comment.