3rd-party JSX elements & props type for other host environment

I’m looking forward to unlocking a lot with the JSX v4 update. Like, support for Solid.js and Preact rather than React.

I wonder if there are any future improvements to domProps. AFAIK it was very loosely defined within the compiler.

React or JSX can be used even in non-DOM environments. For example, when using react-three-fiber, elements that start with a lowercase letter are intrinsic elements defined by Three.js, not DOM. e.g. <mesh />, <ambientLight /> So for TypeScript, JSX DOM props are redefined in the @types/react-dom package, likewise user can override JSX intrinsic element type in other 3rd packages.

I wonder if this will be possible in ReScript in the future as well. Can we get binding for r3f someday?

7 Likes