Skip to content

v8.2.0

Compare
Choose a tag to compare
@CodyJasonBennett CodyJasonBennett released this 14 Jul 09:21
· 561 commits to master since this release

What's Changed

This release exposes a ThreeElements interface containing native three JSX elements to discern from DOM JSX types.

import type { ThreeElements } from '@react-three/fiber'

function Mesh(props: ThreeElements['mesh']) {
  return <mesh {...props} />
}

Extending JSX.IntrinsicElements is deprecated in favor of extending ThreeElements directly with the following:

declare module '@react-three/fiber' {
  interface ThreeElements {
    myMesh: Object3DNode<MyMesh, typeof MyMesh>
  }
}

New Contributors

Full Changelog: v8.1.0...v8.2.0