message: Moved onAnimating into setState callback
diff: @@ -33,15 +33,17 @@ class SharedElementMotion extends React.Component {
  this.animatedId = requestAnimationFrame(() => {
  if (this.state.url !== this.getStateNavigator().stateContext.url)
  return;
  - var {onAnimating} = this.props;
  var sharedElements = this.context.getSharedElements();
  + if (sharedElements.length !== 0) {
  + this.setState({sharedElements}, () => {
  + var {onAnimating} = this.props;
  for(var i = 0; i < sharedElements.length && onAnimating; i++) {
  var {name, oldElement: old, mountedElement: mounted} = sharedElements[i];
  if (!this.state.animatedElements[name])
  onAnimating(name, old.ref, mounted.ref, old.data, mounted.data);
  }
  - if (sharedElements.length !== 0)
  - this.setState({sharedElements});
  + });
  + }
  this.animate();
  });
  }
  