message: Moved raf into componentDidUpdate
  This had me stumped for ages. I'm pretty sure React will have to add a non-static prop update function before componentDidUpdate for raf animation. Moving it into didUpdate meant had to rerun the getItems to check if it needs the raf added?!
diff: @@ -17,21 +17,27 @@ class Motion<T> extends React.Component<MotionProps<T>, any> {
  static defaultProps = {
  progress: 0,
  }
  - componentWillReceiveProps() {
  - if (!this.moveId)
  + componentDidUpdate() {
  + if (!this.moveId && this.getItems(this.state.items, 0).changed)
  this.moveId = requestAnimationFrame(this.move);
  }
  - componentDidMount() {
  - this.moveId = requestAnimationFrame(this.move)
  - }
  componentWillUnmount() {
  cancelAnimationFrame(this.moveId);
  }
  move(tick) {
  this.setState(({items: prevItems}) => {
  + var {items} = this.getItems(prevItems, tick);
  + this.moveId = null;
  + if (items.filter(({rest}) => !rest).length !== 0)
  + this.moveId = requestAnimationFrame(this.move);
  + return {items};
  + })
  + }
  + getItems(prevItems, tick) {
  var {data, enter, leave, update, progress, getKey, duration, onRest} = this.props;
  var dataByKey = data.reduce((acc, item, index) => ({...acc, [getKey(item)]: {...(item as any), index}}), {});
  var itemsByKey = prevItems.reduce((acc, item) => ({...acc, [item.key]: item}), {});
  + var changed = false;
  var items = prevItems
  .map((item, index) => {
  var matchedItem = dataByKey[item.key];
  @@ -45,13 +51,14 @@ class Motion<T> extends React.Component<MotionProps<T>, any> {
  var progressDelta = (nextItem.tick - item.tick) / duration;
  nextItem.progress = Math.min(item.progress + progressDelta, 1);
  } else {
  + changed = true;
  nextItem.rest = false;
  var reverse = !unchanged && this.areEqual(item.start, nextItem.end);
  nextItem.start = reverse ? item.end : (!progress ? item.style : item.start);
  nextItem.progress = reverse ? 1 - item.progress : progress;
  }
  nextItem.style = this.interpolateStyle(nextItem);
  - if (onRest && nextItem.rest && !item.rest)
  + if (tick && onRest && nextItem.rest && !item.rest)
  onRest(item.data);
  return nextItem;
  })
  @@ -59,6 +66,7 @@ class Motion<T> extends React.Component<MotionProps<T>, any> {
  .concat(data
  .filter(item => !itemsByKey[getKey(item)])
  .map(item => {
  + changed = true;
  var index = dataByKey[getKey(item)].index;
  var newItem: any = {key: getKey(item), data: item, progress, tick, rest: false, index};
  newItem.start = newItem.style = enter(item);
  @@ -67,11 +75,7 @@ class Motion<T> extends React.Component<MotionProps<T>, any> {
  })
  )
  .sort((a, b) => a.index - b.index);
  - this.moveId = null;
  - if (items.filter(({rest}) => !rest).length !== 0)
  - this.moveId = requestAnimationFrame(this.move);
  - return {items};
  - })
  + return {items, changed};
  }
  areEqual(from = {}, to = {}) {
  if (Object.keys(from).length !== Object.keys(to).length)
  