<commit_before>import React from 'react'
import {render} from 'react-dom'
import {Motion, spring, TransitionMotion} from 'react-motion'

const Resize = React.createClass({
  getInitialState() {
    return {
      items: [{key: 'a', size: 50}, {key: 'b', size: 60}, {key: 'c', size: 100}],
    };
  },
  componentDidMount() {
    this.setState({
      items: [{key: 'a', size: 50}, {key: 'b', size: 60}], // remove c.
    });
  },
  willLeave() {
    return {width: spring(0), height: spring(0)};
  },
  render() {
    return (
      <TransitionMotion
        willLeave={this.willLeave}
        styles={this.state.items.map(item => ({
          key: item.key,
          style: {width: item.size, height: item.size},
        }))}>
        {interpolatedStyles =>
          <div>
            {interpolatedStyles.map(config => {
              return <div key={config.key} style={{...config.style, border: '1px solid'}} />
            })}
          </div>
        }
      </TransitionMotion>
    );
  },
});

render(<Resize/>, document.getElementById('app'))
<commit_msg>Added keys<commit_after>import React from 'react'
import {render} from 'react-dom'
import {Motion, spring, TransitionMotion} from 'react-motion'

const Resize = React.createClass({
  getInitialState() {
    return {
      items: [{key: 'a', size: 50}, {key: 'b', size: 60}, {key: 'c', size: 100}],
    };
  },
  componentDidMount() {
    this.setState({
      items: [{key: 'a', size: 50}, {key: 'b', size: 60}], // remove c.
    });
  },
  willLeave() {
    return {width: spring(0), height: spring(0)};
  },
  render() {
    return (
      <TransitionMotion
        willLeave={this.willLeave}
        styles={this.state.items.map(item => ({
          key: item.key,
          style: {width: item.size, height: item.size},
        }))}>
        {interpolatedStyles =>
          <div>
            {interpolatedStyles.map(config => {
              return <div key={config.key} style={{...config.style, border: '1px solid'}}>{config.key}</div>
            })}
          </div>
        }
      </TransitionMotion>
    );
  },
});

render(<Resize/>, document.getElementById('app'))

{'fraction_non_alphanumeric': 0.18805412972468502, 'fraction_numerical': 0.013065795613625758, 'mean_word_length': 2.392405063291139, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3806690', 'n_tokens_mistral': 724, 'n_tokens_neox': 693, 'n_words': 155}