github pmndrs/react-three-fiber v8.2.0

latest releases: v8.17.10, v8.17.9, v8.17.8...
2 years ago

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

Don't miss a new react-three-fiber release

NewReleases is sending notifications on new releases.