The first approach doesn't work because it'll give the user motion sickness. The device must be able to interpolate between "frames" faster than you can update them, and providing the info needed for you to do that is a privacy issue.
https://github.com/pmndrs/react-xr
Apple announced support for WebXR on VisionOS as well.
I think it will be a lot more interesting once webGPU hits too, as it will be closer to native-level GPU programming but portable between both native and web contexts.