title: Expo camera zoom
body: <p>That's my first time using the Pinch Gesture Handler in React Native... I'm trying to create a zoomable camera using Expo. What i'm doing is:</p>
  
  <pre><code>const handlePinch = (nativeEvent) =&gt; {
     const { scale, velocity } = nativeEvent;
  
     let newZoom =
       velocity &gt; 0
         ? zoom + scale * velocity * (Platform.OS === "ios" ? 0.01 : 25)
         : zoom -
           scale * Math.abs(velocity) * (Platform.OS === "ios" ? 0.02 : 50);
  
     if (newZoom &lt; 0) newZoom = 0;
     else if (newZoom &gt; 0.5) newZoom = 0.5;
  
     setZoom(newZoom);
  };
  
  ...
  
  &lt;ExpoCamera
      ...
      zoom={zoom}
      ...
    &gt;
  </code></pre>
  
  <p>Working but not too smoothy... Is there any better way to do this?</p>