Skip to content

How to Read R3F Like Three.js

When you read R3F, imagine each JSX tag as a Three.js object being created and attached somewhere in the scene.

R3FThree.js idea
<mesh />new THREE.Mesh()
<boxGeometry args={[1, 1, 1]} />new THREE.BoxGeometry(1, 1, 1)
<meshStandardMaterial color="orange" />new THREE.MeshStandardMaterial({ color: 'orange' })
JSX nestingparent.add(child)
position={[1, 2, 3]}object.position.set(1, 2, 3)
useFrame(...)a render loop update step
<mesh position={[0, 1, 0]}>
<boxGeometry args={[1, 1, 1]} />
<meshStandardMaterial color="#f97316" />
</mesh>

Read that like this:

  1. Create a THREE.Mesh.
  2. Set its position to [0, 1, 0].
  3. Attach a THREE.BoxGeometry(1, 1, 1).
  4. Attach a THREE.MeshStandardMaterial({ color: '#f97316' }).
  • Look for lowercase JSX tags first. They usually map directly to Three.js classes.
  • Treat args as constructor parameters.
  • Treat nested children as ownership or attachment.
  • Treat props like position, rotation, and visible as familiar Three.js instance properties.
  • Not every React pattern belongs inside a frame loop.
  • Not every helper abstraction makes the scene easier to understand.
  • R3F is not replacing Three.js APIs. It is giving you a different way to compose them.

Once that clicks, the conversion pages become much less mysterious.