
R3f Best Practices
If you're building with React Three Fiber, you're probably fighting re-renders. This is a battle-tested reference covering 70+ rules across the entire Poimandres ecosystem: fiber, drei, zustand, rapier, postprocessing. The priorities are right. Performance and useFrame patterns come first because that's where most developers hurt themselves, like calling setState in useFrame and tanking to single-digit FPS. The Zustand selector patterns alone will save you hours of debugging why your scene stutters. It's comprehensive without being academic, organized by impact rather than alphabetically, and includes the specific anti-patterns that actually show up in production code. Worth having loaded when you're optimizing or reviewing R3F projects.
- skills.sh installs
- 1.6K
- GitHub stars
- 68
- last updated
- Aug 21, 2026
Install
$ npx -y skills add emalorenzo/three-agent-skills --skill r3f-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
React Three Fiber Best Practices
Comprehensive guide for React Three Fiber and the Poimandres ecosystem. Contains 70+ rules across 12 categories, prioritized by impact.
Sources & Credits
Additional tips from 100 Three.js Tips by Utsubo
When to Apply
Reference these guidelines when:
- Writing new R3F components
- Optimizing R3F performance (re-renders are the #1 issue)
- Using Drei helpers correctly
- Managing state with Zustand
- Implementing post-processing or physics
Ecosystem Coverage
- @react-three/fiber - React renderer for Three.js
- @react-three/drei - Useful helpers and abstractions
- @react-three/postprocessing - Post-processing effects
- @react-three/rapier - Physics engine
- zustand - State management
- leva - Debug GUI
Rule Categories by Priority
Sponsors
Details
- Repository
- github.com/emalorenzo/three-agent-skills
- Categories
- Frontend Development, Documentation, AI & Agent Building, Go
- First seen
- May 16, 2026