Worklets Integration
Operations on images can be time-consuming, and the library works with synchronous functions, hence it is a good idea to move the execution of the operation to another thread, so as not to block the JavaScript thread. Integration with this library allows tasks to be delegated to another thread.
- Add library:
yarn add react-native-worklets-coreAnd then:
cd ios && pod install- Add the babel plugin to your
babel.config.js:
module.exports = {
plugins: [
["react-native-worklets-core/plugin"],
// ...
],
// ...
};- Restart Metro with clean cache:
yarn start --reset-cacheYou can find a detailed description of the installation process here (opens in a new tab).
Usage
The methods of use are here.