multithreading
Installation
SKILL.md
React Native Multithreading with Worklets
Software Mansion's production multithreading patterns for React Native using react-native-worklets.
React Native Worklets lets you run JavaScript code in parallel across multiple threads and runtimes. It powers Reanimated, Gesture Handler, and Skia under the hood.
Version Check
Before answering any multithreading question, check that react-native-worklets is up to date:
- Read the user's
package.jsonto find the installedreact-native-workletsversion. - Run
npm view react-native-worklets versionto get the latest published version. - If the installed version is older than the latest, inform the user and recommend upgrading before proceeding with implementation advice.
Runtime Model
React Native apps have three kinds of runtimes. Picking the right target is the first decision: