expo-native-ui
Build native-feeling Expo screens: Apple HIG styling, semantic colors, native controls, SF Symbols, media, visual effects, gradients and responsive layout.
Install
npx skills add https://github.com/expo/skills --skill expo-native-uiWebGPU & Three.js for Expo
Use this skill for ANY 3D graphics, games, GPU compute, or Three.js features in React Native.
Locked Versions (Tested & Working)
Critical: These versions are tested together. Mismatched versions cause type errors and runtime issues.
Installation
Note: --legacy-peer-deps may be required due to peer dependency conflicts with canary Expo versions.
Metro Configuration
Create metro.config.js in project root:
Required Lib Files
Create these files in src/lib/:
1. make-webgpu-renderer.ts
2. fiber-canvas.tsx
Basic 3D Scene
Lazy Loading (Recommended)
Use React.lazy to code-split Three.js for better loading:
Common Geometries
Lighting
Animation with useFrame
Particle Systems
Touch Controls (Orbit)
See the full orbit-controls.tsx implementation in the lib files. Usage:
Common Issues & Solutions
1. "X is not part of the THREE namespace"
Problem: Error like AmbientLight is not part of the THREE namespace
Solution: Add the missing component to the extend() call in fiber-canvas.tsx:
2. TypeScript Errors with Three.js
Problem: Type mismatches between three.js and R3F
Solution: Use @ts-expect-error comments where needed:
3. Blank Screen
Problem: Canvas renders but nothing visible
Solution:
- Ensure camera is positioned correctly and looking at scene
- Add lighting (objects are black without light)
- Check that
extend()includes all components used
4. Performance Issues
Problem: Low frame rate or stuttering
Solution:
- Reduce polygon count in geometries
- Use
useMemofor static data - Limit particle count
- Use
instancedMeshfor many identical objects
5. Peer Dependency Errors
Problem: npm install fails with ERESOLVE
Solution: Use --legacy-peer-deps:
Building
WebGPU requires a custom build:
Note: WebGPU does NOT work in Expo Go.