function animate({from, to}, {duration, easingFunction}) {
  const domEl = from.domEl;
  const x = from.offsetLeft - to.offsetLeft;
  const y = from.offsetTop - to.offsetTop;

  domEl.style.pointerEvents = 'none';
  domEl.style.transform = `translate3d(${x}px, ${y}px, 0)`;

  requestAnimationFrame(() => {
    domEl.addEventListener('transitionend', resetElementOnTransitionEnd);
    domEl.style.transition = `transform ${duration}ms ${easingFunction}`;
    domEl.style.transform = '';
  });
}
Animates two elements
@param {Object} element
@param {Object} element.from
@param {Object} element.to
@param {Object} options
@param {Number} options.duration
@param {String} options.easingFunction
@private