title: How can I update multiple animated values with a single gesture handler event callback in React Native using the Animated library?
body: <p>How can I update multiple animated values with a single gesture handler in React Native? I want to do something like this, but update the scale value as well as another value.</p>
  <pre><code>let scale = new Animated.Value(1)
  let foo = new Animated.Value(1)
  
    const onPinchEvent = Animated.event(
      [
        {
          nativeEvent: { scale: scale }
        },
  
        { 
          nativeEvent: { focalX: foo }
        }
      ],
      {
         listener: (event) =&gt; console.log(event.nativeEvent),
         useNativeDriver: true
      }
    )
  </code></pre>
  <p>I get this error:</p>
  <blockquote>
  <p>Invariant Violation: Event has less arguments than mapping</p>
  </blockquote>