
R3f Fundamentals
React Three Fiber scene setup with Canvas, typed JSX, hooks, render-loop control, and resource ownership rules.
- skills.sh installs
- 2.4K
- GitHub stars
- 138
- last updated
- Aug 21, 2026
What it does
- Covers scene architecture and render-loop setup: Canvas placement,
useFrameanduseThreeusage, and on-demand rendering withinvalidate() - Includes a minimal rotating-mesh example, scene and type boundary rules, and renderer pitfalls for Fiber 9 with React 19 and Three.js
- Enforces that Three.js hooks stay beneath Canvas and that DOM UI stays outside it, with Drei
Htmlas the sanctioned bridge - Designed for developers setting up R3F scenes who need version-matched APIs and clear disposal ownership rather than materials or effects
Install
$ npx -y skills add enzed/r3f-skills --skill r3f-fundamentals -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
React Three Fiber fundamentals
Choose the right baseline
- Inspect the project's manifest and lockfile before selecting APIs. These examples target Fiber 9 / React 19; Fiber 8 pairs with React 18. Do not upgrade a project just to match a recipe.
- Check installed Three.js and Drei versions too. Use released documentation matching those versions; if unavailable, state the uncertainty instead of inventing props.
- Keep the existing renderer unless the task calls for changing it. For WebGPU, read renderer selection; Fiber 10 alpha APIs are not Fiber 9 APIs.
Minimal scene
This example owns its Canvas. Its parent must have a nonzero height.
import { useRef } from 'react'
import { Canvas, useFrame, type ThreeElements } from '@react-three/fiber'
import type { Mesh } from 'three'
function RotatingBox(props: ThreeElements['mesh']) {
const mesh = useRef<Mesh>(null)
useFrame((_, delta) => {
if (mesh.current) mesh.current.rotation.y += delta * 0.5
})
return (
<mesh {...props} ref={mesh}>
<boxGeometry args={[1, 1, 1]} />
<meshStandardMaterial color="coral" />
</mesh>
)
}
Details
- Repository
- github.com/enzed/r3f-skills
- Categories
- 3D, CAD & Modeling, Frontend & UI Code
- First seen
- May 16, 2026
More from enzed/r3f-skills
All 11Similar to R3f Fundamentals
More 3D, CAD & Modeling
r3f-geometryenzed/r3f-skills2.2K installsReact Three Fiber geometry guide for built-in shapes, custom buffers, and instanced rendering, separate from material appearance.
react-three-fiberfreshtechbro/claudedesignskills4.3K installsDeclarative 3D scene building in React with React Three Fiber, a React renderer for Three.js.
react-native-r3fmindrally/skills695 installsExpert guidance for React Three Fiber scenes using React, Vite, Tailwind CSS, and Next UI conventions.
three-jsmindrally/skills854 installsExpert Three.js and React Three Fiber guidance covering modern React, TypeScript, and rendering performance.
r3f-texturesenzed/r3f-skills2K installsReact Three Fiber texture guide covering color spaces, UV channels, caching, sampling, video, and render targets.
r3f-best-practicesemalorenzo/three-agent-skills1.7K installsReact Three Fiber performance and ecosystem guidance covering 70+ prioritized rules across 12 categories.