react-native-worklets-core
TypeScript icon, indicating that this package has built-in type declarations

1.3.3 • Public • Published

🧵 react-native-worklets-core

A Worklet runner for React Native.

const worklet = () => {
  'worklet'
  return Math.random()
}

[!NOTE] In most cases, react-native-worklets-core shouldn't be used as a standalone dependency but rather as a peer-dependency for other modules such as react-native-vision-camera, react-native-wishlist, or react-native-skia.

Installation

  1. Install the library from npm:
    yarn add react-native-worklets-core
  2. Add the babel plugin to your babel.config.js:
    module.exports = {
      plugins: [
        ["react-native-worklets-core/plugin"],
        // ...
      ],
      // ...
    };
  3. Restart Metro with clean cache:
    yarn start --reset-cache

Usage

See USAGE.md

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Credits

  • Credits go to Christian Falch for building the initial version of this library. You're amazing! 🤩
  • Credits go to Software Mansion for introducing the concept of Worklets in Reanimated v2. This library is inspired by Reanimated v2 with a few structural changes to the Worklets architecture to make it more flexible for different use-cases, such as integrating it with other C++ libraries like VisionCamera and WishList.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.314,947latest
2.0.0-beta.438beta

Version History

VersionDownloads (Last 7 Days)Published
2.0.0-beta.438
2.0.0-beta.38
2.0.0-beta.27
2.0.0-beta.110
1.3.314,947
1.3.235
1.3.15
1.3.080
1.2.0639
1.1.36
1.1.25
1.1.1375
1.1.05
1.0.016
1.0.0-beta.45
1.0.0-beta.35
1.0.0-beta.25
1.0.0-beta.15
1.0.0-beta.05
0.5.05,411
0.4.01,488
0.3.0704
0.2.4766
0.2.30
0.2.26
0.2.110
0.2.033

Package Sidebar

Install

npm i react-native-worklets-core

Weekly Downloads

24,619

Version

1.3.3

License

MIT

Unpacked Size

400 kB

Total Files

99

Last publish

Collaborators

  • chrfalch
  • mrousavy