Turn off zappar camera in React+ThreeJS


Hi, can I turn off or deactivate the in my react proyect?


Hi @max.ojeda,

you’re able to toggle it off as so:
<ZapparCamera makeDefault={false} />

If you have a boolean state such as

const [cameraActive, setCameraActive] = useState(true);

you could toggle it back and forth via something like:

<ZapparCamera makeDefault={cameraActive} />
// ...
onClick={() => { setCameraActive((currentState) => !currentState); }}