What's Changed
- refactor: renderer update by @bart-krakowski in #2360
- feat: expose ThreeElements interface by @AndrewPrifer in #2347
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
- @bart-krakowski made their first contribution in #2360
- @AndrewPrifer made their first contribution in #2347
Full Changelog: v8.1.0...v8.2.0