Type error for boilerplate's App.tsx sphere's ref
Opened this issue · 1 comments
jayypluss commented
Type error for sphere's ref:
https://github.com/brianzinn/create-react-app-typescript-babylonjs/blob/master/src/App.tsx#L69
brianzinn commented
hi @jayypluss - it's a bit stricter in react 18. you need:
let sphereRef = useRef<Nullable<Mesh>>(null);
additionally on newer @babylonjs/core there is a side-effect you need to import if you are keeping the shadowgenerator:
import "@babylonjs/core/Lights/Shadows/shadowGeneratorSceneComponent";
