I have tried everything I could think off and everything I could find on this problem but I cannot get it to work. VS Code doesn't show any errors, but I keep on getting this warning:
"Warning: The tag is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter. at primitive at Computers at section at Hero at div at div at Router (http://localhost:5173/node_modules/.vite/deps/react-router-dom.js?v=d0415b85:3514:15) at BrowserRouter (http://localhost:5173/node_modules/.vite/deps/react-router-dom.js?v=d0415b85:3963:5) at App"
However, changing the tag primitive to uppercase letter doesn't work as Primitive is not defined in react-three. Belove is my code
import { Suspense, useEffect, useState } from "react";
import { Canvas } from "@react-three/fiber";
import { OrbitControls, Preload, useGLTF } from "@react-three/drei";
import CanvasLoader from '../Loader'
const Computers = () => {
const computer = useGLTF('/lowpoly_earth/scene.gltf')
return (
<primitive object={computer.scene}/>
)
}
const ComputersCanvas = () => {
return(
<Canvas
frameloop="demand"
shadows
camera={{ }}
gl={{ preserveDrawingBuffer: true }}
>
<Suspense fallback={<CanvasLoader />}>
<OrbitControls
enableZoom
autoRotate
maxPolarAngle={Math.PI / 2}
minPolarAngle={Math.PI / 2}
/>
<Computers />
</Suspense>
<Preload all />
</Canvas>
)
}
export default Computers
Does anyone have any idea how to solve this? It would be highly appreciated because I can slowly feel my mentality going boom because of this.