React Three Fiber Documentation
Hooks allow you to tie or request specific information to your component. For instance, components that want to participate in the renderloop can use useFrame, components that need to be informed of three.js specifics can use useThree and so on. All hooks clean up after themselves once the component unmounts.
https://docs.pmnd.rs/react-three-fiber/API/hooks