Skip to content

fix(deps): update dependency @react-three/fiber to v9.5.0#82

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/react-three-fiber-9.x
Open

fix(deps): update dependency @react-three/fiber to v9.5.0#82
renovate[bot] wants to merge 1 commit intomainfrom
renovate/react-three-fiber-9.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Aug 25, 2025

This PR contains the following updates:

Package Change Age Confidence
@react-three/fiber 9.0.0-rc.19.5.0 age confidence

Release Notes

pmndrs/react-three-fiber (@​react-three/fiber)

v9.5.0

Compare Source

After a bit of research and development, R3F is now compatible with React 19.2, including the Activity feature!

Why did this take some effort, you might wonder? When React bumped to version 19.2.x, they also bumped the internal reconciler up a version which was not backwards compatible with 19.1.x. This put us in an awkward position of either making a breaking change in the middle of R3F v9, bump to another major just because of an internal detail from React or get creative. We chose to get creative and R3F is compatible with all versions of React between 19.0 and 19.2. The downside is we had to bundle the reconciler with R3F, but react-dom already does this so for now it is the best solution available.

Forcing breaking changes on libraries is likely not what the React teams intended so we will be working with them to try to avoid this in the future.

Happy coding.

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.4.2...v9.5.0

v9.4.2

Compare Source

What's Changed

New Contributors

Full Changelog: pmndrs/react-three-fiber@v9.4.1...v9.4.2

v9.4.1

Compare Source

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.4.0...v9.4.1

v9.4.0

Compare Source

What's Changed
New Contributors

Full Changelog: pmndrs/react-three-fiber@v9.3.0...v9.4.0

v9.3.0

Compare Source

With this release we have two big fixes.

  1. flushSync now works properly. To prove it we added an example that allows you to React props and then take a screenshot of the R3F canvas with the latest state. This is a pretty advanced use case, but one people might be interested to explore for exporting videos or images using R3F.
  2. React Native support has been fixed for 0.79 and newer when combined with the same update to Drei: pmndrs/drei#2494. A big thanks to @​thejustinwalsh for helping us with this one.

What's Changed

New Contributors

Full Changelog: pmndrs/react-three-fiber@v9.1.4...v9.3.0

v9.2.0

Compare Source

v9.1.4

Compare Source

What's Changed
New Contributors

Full Changelog: pmndrs/react-three-fiber@v9.1.3...v9.1.4

v9.1.3

Compare Source

What's Changed

New Contributors

Full Changelog: pmndrs/react-three-fiber@v9.1.2...v9.1.3

v9.1.2

Compare Source

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.1.1...v9.1.2

v9.1.1

Compare Source

Most importantly, this fixes rsbuild with vReact 19.1.0 and later.

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.1.0...v9.1.1

v9.1.0

Compare Source

What's Changed

New Contributors

Full Changelog: pmndrs/react-three-fiber@v9.0.4...v9.1.0

v9.0.4

Compare Source

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.0.3...v9.0.4

v9.0.3

Compare Source

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.0.2...v9.0.3

v9.0.2

Compare Source

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.0.1...v9.0.2

v9.0.1

Compare Source

What's Changed

Full Changelog: pmndrs/react-three-fiber@v9.0.0...v9.0.1

v9.0.0

Compare Source

This is a compatibility release for React 19, which brings further performance, stability, and type improvements. You can check out the React 19 changelog here.

We would like to express our gratitude to the community for their continued support, as well as to all our contributors, including the React team at Meta and Vercel, for ensuring this upgrade went smoothly. 🎉

[!WARNING]
This release contains breaking changes when using Strict Mode, which can highlight bugs during development. See StrictMode.

Features

useLoader Accepts Loader Instance

useLoader now supports re-use of external loader instances for more controlled pooling and setup.

import { GLTFLoader } from 'three/addons'
import { useLoader } from '@​react-three/fiber'

function Model() {
  const gltf = useLoader(GLTFLoader, '/path/to/model.glb')
  // ...
}

// or,

const loader = new GLTFLoader()
function Model() {
  const gltf = useLoader(loader, '/path/to/model.glb')
  // ...
}
Factory extend Signature

extend can now produce a component when a three.js class is passed to it individually instead of a catalog of named classes. This is backwards compatible and reduces TypeScript boilerplate and JSX collisions. We recommend libraries migrate to this signature so internal components don't clash with user-land declarations.

import { OrbitControls } from 'three/addons'
import { type ThreeElement, type ThreeElements } from '@​react-three/fiber'

declare module '@​react-three/fiber' {
  interface ThreeElements {
    orbitControls: ThreeElement<typeof OrbitControls>
  }
}

extend({ OrbitControls })

<orbitControls args={[camera, gl.domElement]}>

// or,

const Controls = extend(OrbitControls)
<Controls args={[camera, gl.domElement]} />
Async GL prop

The Canvas GL prop accepts constructor parameters, properties, or a renderer instance via a callback. The callback now passes constructor parameters instead of just a canvas reference.

<Canvas
  gl={{ reverseDepthBuffer: true }}
- gl={(canvas) => new WebGLRenderer({ canvas })}
+ gl={(props) => new WebGLRenderer(props)}
>

Further, a callback passed to GL can now return a promise for async constructors like WebGPURenderer (see WebGPU).

<Canvas
  gl={async (props) => {
    // ...
    return renderer
  }}
>

WebGPU

Recent Three.js now includes a WebGPU renderer. While still a work in progress and not fully backward-compatible with all of Three's features, the renderer requires an async initialization method. R3F streamlines this by allowing the gl prop to return a promise.

import * as THREE from 'three/webgpu'
import * as TSL from 'three/tsl'
import { Canvas, extend, useFrame, useThree } from '@&#8203;react-three/fiber'

declare module '@&#8203;react-three/fiber' {
  interface ThreeElements extends ThreeToJSXElements<typeof THREE> {}
}

extend(THREE as any)

export default () => (
  <Canvas
    gl={async (props) => {
      const renderer = new THREE.WebGPURenderer(props as any)
      await renderer.init()
      return renderer
    }}>
      <mesh>
        <meshBasicNodeMaterial />
        <boxGeometry />
      </mesh>
  </Canvas>
)

Fixes

Color Management of Textures

Automatic sRGB conversion of texture props has been removed. Color textures are now handled automatically for built-in materials, aligning with vanilla Three.js behavior. This prevents issues where data textures (e.g., normals or displacement) become corrupted or non-linear. For custom materials or shaders, annotate color textures with texture.colorSpace = THREE.SRGBColorSpace or texture-colorSpace={THREE.SRGBColorSpace} in JSX.

For more details, see https://threejs.org/docs/#manual/en/introduction/Color-management.

Suspense and Side-Effects

The handling of Suspense and fallback content has improved in React and R3F. Side-effects like attach and constructor effects (e.g., controls adding event listeners) no longer fire repeatedly without proper cleanup during suspension.

import { ThreeElement, useThree } from '@&#8203;react-three/fiber'
import { OrbitControls } from 'three/addons'

declare module '@&#8203;react-three/fiber' {
  interface ThreeElements {
    OrbitControls: ThreeElement<typeof OrbitControls>
  }
}

extend({ OrbitControls })

function Controls() {
  const camera = useThree((state) => state.camera)
  const gl = useThree((state) => state.gl)

  // Will only initialize when tree is connected to screen
  return <orbitControls args={[camera, gl.domElement]}>
}

<Suspense>
  <Controls />
  <AsyncComponent />
</Suspense>
Swapping with args and primitives

Swapping elements when changing the args or primitive object prop has been improved for structured children like arrays or iterators (React supports both, including async iterators). Previously, primitives sharing an object could update out of order or be removed from the scene along with their children.

See: #​3272

TypeScript Changes

Props renamed to CanvasProps

Canvas Props is now called CanvasProps for clarity. These were aliased in v8 for forward compatibility, but Props is removed with v9.

-function Canvas(props: Props)
+function Canvas(props: CanvasProps)
Dynamic JSX Types

Since R3F's creation, JSX types had to be maintained in accordance with additions to three core API. Although missing or future types could be ignored or resilient for forward and backwards compatibility, this was a major maintenance burden for us and those extending three. Furthermore, libraries which wrap or bind to the known catalog of elements (e.g. React Spring <animated.mesh />) had no way of knowing which elements belonged to a renderer.

Since v8, we've added a catalog of known elements to a ThreeElements interface, and with v9 automatically map three API to JSX types. As types are now dynamically mapped, hardcoded exports like MeshProps have been removed, and can be accessed as ThreeElements['mesh']. Helper types like Color or Vector3 remain to reflect the JSX MathType API for shorthand expression.

-import { MeshProps } from '@&#8203;react-three/fiber'
-type Props = MeshProps

+import { ThreeElements } from '@&#8203;react-three/fiber'
+type Props = ThreeElements['mesh']
Node Helpers

Specialized Node type helpers for extending JSX (Node, Object3DNode, BufferGeometryNode, MaterialNode, LightNode) are removed and combined into 'ThreeElement', which accepts a single type representing the extended element instance.

import { type ThreeElement } from '@&#8203;react-three/fiber'

declare module '@&#8203;react-three/fiber' {
  interface ThreeElements {
    customElement: ThreeElement<typeof CustomElement>
  }
}

extend({ CustomElement })
ThreeElements

ThreeElements was added as an interface since v8.1.0 and is the current way of declaring or accessing JSX within R3F since React's depreciation of global JSX (see https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript). All JSX types belonging to R3F are accessible from ThreeElements.

-import { type Node } from '@&#8203;react-three/fiber'
-
-declare global {
-  namespace JSX {
-    interface IntrinsicElements {
-      customElement: Node<CustomElement, typeof CustomElement>
-    }
-  }
-}
-
-extend({ CustomElement })

+import { type ThreeElement } from '@&#8203;react-three/fiber'
+
+declare module '@&#8203;react-three/fiber' {
+  interface ThreeElements {
+    customElement: ThreeElement<typeof CustomElement>
+  }
+}
+
+extend({ CustomElement })

Testing

StrictMode

StrictMode is now correctly inherited from a parent renderer like react-dom. Previously, <StrictMode /> mounted in another root such as react-dom would not affect the R3F canvas, so it had to be redeclared within the canvas as well.

<StrictMode>
  <Canvas>
-    <StrictMode>
-      // ...
-    </StrictMode>
+    // ...
  </Canvas>
</StrictMode>

Keep in mind, this change may affect the behavior of your application. If you encounter anything that worked before and fails now, profile it first in dev and then production. If it works in prod then strict mode has flushed out a side-effect in your code.

Act

act is now exported from React itself and can be used for all renderers. It will return the contents of a passed async callback like before and recursively flush async effects to synchronously test React output.

import { act } from 'react'
import { createRoot } from '@&#8203;react-three/fiber'

const store = await act(async () => createRoot(canvas).render(<App />))
console.log(store.getState())

Full Changelog: pmndrs/react-three-fiber@v8.18.0...v9.0.0

v9.0.0-rc.10

Compare Source

v9.0.0-rc.9

Compare Source

v9.0.0-rc.8

Compare Source

v9.0.0-rc.7

Compare Source

v9.0.0-rc.6

Compare Source

v9.0.0-rc.5

Compare Source

v9.0.0-rc.4

Compare Source

v9.0.0-rc.3

Compare Source

v9.0.0-rc.2

Compare Source


Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Aug 25, 2025
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 25, 2025

Deploy Preview for tools-aiwan-run ready!

Name Link
🔨 Latest commit 67dcc8f
🔍 Latest deploy log https://app.netlify.com/projects/tools-aiwan-run/deploys/693085f8e8feb00007b3298b
😎 Deploy Preview https://deploy-preview-82--tools-aiwan-run.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch 2 times, most recently from 3102205 to 51fe796 Compare September 26, 2025 02:54
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from 51fe796 to 1cc14eb Compare October 13, 2025 07:41
@renovate renovate bot changed the title fix(deps): update dependency @react-three/fiber to v9.3.0 fix(deps): update dependency @react-three/fiber to v9.4.0 Oct 13, 2025
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch 2 times, most recently from b3fb0cf to ba04e5a Compare October 21, 2025 20:49
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch 2 times, most recently from 062fb38 to cd075f6 Compare November 11, 2025 00:45
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from cd075f6 to e1fdb7a Compare November 29, 2025 13:00
@renovate renovate bot changed the title fix(deps): update dependency @react-three/fiber to v9.4.0 fix(deps): update dependency @react-three/fiber to v9.4.2 Nov 29, 2025
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from e1fdb7a to 67dcc8f Compare December 3, 2025 18:48
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from 67dcc8f to c3d1a1a Compare December 30, 2025 09:46
@renovate renovate bot changed the title fix(deps): update dependency @react-three/fiber to v9.4.2 fix(deps): update dependency @react-three/fiber to v9.5.0 Dec 30, 2025
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 30, 2025

Deploy Preview for tools-aiwan-run ready!

Name Link
🔨 Latest commit c3d1a1a
🔍 Latest deploy log https://app.netlify.com/projects/tools-aiwan-run/deploys/69539f95a013620008b69551
😎 Deploy Preview https://deploy-preview-82--tools-aiwan-run.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from c3d1a1a to 75d96a4 Compare January 23, 2026 01:41
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 23, 2026

Deploy Preview for tools-aiwan-run ready!

Name Link
🔨 Latest commit 3690c20
🔍 Latest deploy log https://app.netlify.com/projects/tools-aiwan-run/deploys/69b3ea7178e7240008d42423
😎 Deploy Preview https://deploy-preview-82--tools-aiwan-run.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from 75d96a4 to b39e49f Compare January 23, 2026 19:42
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from b39e49f to 715fe93 Compare February 2, 2026 17:00
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from 715fe93 to ef9854a Compare February 12, 2026 10:03
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from ef9854a to 986420e Compare February 23, 2026 10:42
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from 986420e to 4a337a7 Compare March 5, 2026 14:48
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from 4a337a7 to 3690c20 Compare March 13, 2026 10:43
@renovate renovate bot force-pushed the renovate/react-three-fiber-9.x branch from 3690c20 to 5aa8b05 Compare April 1, 2026 20:09
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for tools-aiwan-run ready!

Name Link
🔨 Latest commit 5aa8b05
🔍 Latest deploy log https://app.netlify.com/projects/tools-aiwan-run/deploys/69cd7b70ab7bdd0008541a64
😎 Deploy Preview https://deploy-preview-82--tools-aiwan-run.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants