src/scroll-item.js
function cleanupStyles(item) {
  var prop;
  var reactProps;
  if (item.props.style) {
    reactProps = {};
    for(prop in item.props.style) {
      reactProps[prop] = item._node.style[prop];
    }
  }
  item._node.removeAttribute('style');
  if (reactProps) {
    for(prop in reactProps) {
      item._node.style[prop] = reactProps[prop];
    }
  }
  if (item._prevStyles) {
    for(prop in item._prevStyles) {
      item._node.style[prop] = item._prevStyles[prop];
    }
  }
}
function cleanupStyles(item) {
  var prop;
  var reactProps;
  if (item.props.style) {
    reactProps = {};
    for(prop in item.props.style) {
      reactProps[prop] = item._node.style[prop];
    }
  }
  item._node.removeAttribute('style');
  if (reactProps) {
    for(prop in reactProps) {
      item._node.style[prop] = reactProps[prop];
    }
  }
  if (item._prevStyles) {
    for(prop in item._prevStyles) {
      item._node.style[prop] = item._prevStyles[prop];
    }
  }
}
/*
cleanupStyles
-------------
Used for removing all prefixed versions added by server-side rendering.
There is a lot of edge-cases in browsers with vendor prefixes, so the
only strategy that works consistently is let React render all prefixed styles
at all times, then having this cleanup phase that removes all styles, then adds
back the styles that we should keep.

Given: <div style="-webkit-transform:FOO;transform:FOO;">
Known cases:
In Chrome <= 42 the example will render the values for -webkit-transform
even though unprefixed transform is supported. This will cause the runtime
to use transform while the browser is rendering -webkit-transform.
Both Safari and Chrome will remove all combination of prefixes when
removing a property. So `_node.style.WebkitTransform = null;` will also
remove `_node.style.transform`.

We go though all this trouble to make sure we recover from server-side rendering
without using states. This whole library should not use state in any fashion, for
the simple reason of not interfering with the consumer application. If we used
state in any fashion, then it would require every single consumer to fine-tune
their component for double-step mounting.