How to hook up react-three-fiber to mobx?
I have this component. How do I hook it up?
export default function Player(props) {
const mesh = useRef()
useFrame((a) => {
});
return (
<mesh>
<boxBufferGeometry args={[1, 1, 1]} />
<meshStandardMaterial color={'orange'} />
</mesh>
)
}
Have you tried wrapping it with observer
?
If that doesn't work, you can use a local state and set it through a reaction
callback.