enzed avatar

R3f Fundamentals

This covers the foundational React Three Fiber concepts you'll reach for constantly: setting up the Canvas with camera and renderer options, using useFrame for animations and useThree for accessing scene state, and writing Three.js objects as JSX elements. The examples show practical patterns like selective state subscription to avoid unnecessary re-renders, frame priority control, and the args prop for geometry parameters. What's useful here is seeing how R3F bridges the imperative Three.js world with React's declarative model. If you're building anything in R3F, you'll use these primitives in every scene, so having quick reference for Canvas props, the state object shape, and attach syntax saves you from digging through docs mid-flow.

skills.sh installs
2.3K
GitHub stars
135
last updated
Aug 21, 2026

Install

$ npx -y skills add enzed/r3f-skills --skill r3f-fundamentals --agent claude-code

Installs into .claude/skills of the current project.

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>
  )
}

Sponsors

Details

Repository
github.com/enzed/r3f-skills
Categories
Frontend Development, Go
First seen
May 16, 2026

More from enzed/r3f-skills

All 11
1juliusbrussee avatarinterface-kitjuliusbrussee/skillsAuthoritative guide for implementing stunning, accessible, performant UI. Synthesizes design engineering philosophy, accessibility standards, animation principl2.3Kskills.sh installs
2nexu-io avatargsap-frameworksnexu-io/open-designOfficial GSAP skill for Vue, Svelte, and other non-React frameworks — lifecycle, scoping selectors, cleanup on unmount. Use when the user wants animation in Vue2.2Kskills.sh installs
3jezweb avatartanstack-startjezweb/claude-skillsBuild a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadc2.2Kskills.sh installs
4android avatarstylesandroid/skillsUse this skill to integrate the Jetpack Compose Styles API into an Android project. This skill guides you through upgrading dependencies, setting up component t2.2Kskills.sh installs
5netresearch avatarcontext7netresearch/context7-skillUse when looking up library documentation, API references, framework patterns, or code examples for ANY library (React, Next.js, Vue, Django, Laravel, etc.) and2.1Kskills.sh installs
6josiahsiegel avatartailwindcss-mobile-firstjosiahsiegel/claude-plugin-marketplaceMobile-first responsive design patterns with Tailwind CSS v4 (2025-2026). PROACTIVELY activate for: (1) mobile-first design with Tailwind breakpoints (sm:, md:,2.1Kskills.sh installs