Installation
Install the package, its peer dependencies, and Babel plugins.
Install
pnpm add react-native-wgpu-components \
react-native-wgpu \
react-native-webgpu-worklets \
react-native-reanimated \
react-native-worklets \
typegpunpm install react-native-wgpu-components \
react-native-wgpu \
react-native-webgpu-worklets \
react-native-reanimated \
react-native-worklets \
typegpureact-native-gesture-handler is an optional peer — only required if you opt
into followCursor on a component.
Babel plugins
Add these to your app's babel.config.js:
module.exports = {
presets: ['babel-preset-expo'],
plugins: [
'unplugin-typegpu/babel',
'react-native-worklets/plugin', // must be last
],
};unplugin-typegpu is what transforms the TypeScript shader code (the
'use gpu' functions inside the package) into WGSL at build time.
react-native-worklets/plugin is required by Reanimated v4.
Requirements
| Minimum | |
|---|---|
| React Native | 0.81 (new architecture) |
| React | 19.0 |
| Expo | 55 (if you use Expo) |
react-native-wgpu | 0.5 |
react-native-reanimated | 4.1 |
typegpu | 0.11 |
The package targets the new architecture — old-arch installs aren't supported.
Platforms
Works on iOS, Android, and Web. See Platforms for the GPU backend details and a few caveats.