<commit_before>import Immutable from 'immutable';

import Alt from '../Alt';
import ListActions from '../actions/ListActions';

class ListStore {
  constructor() {
    this.items = Immutable.List();

    this.bindListeners({
      handleUpdateItems: ListActions.UPDATE_ITEMS,
      handleAddItem: ListActions.ADD_ITEM
    });
  }

  handleUpdateItems(items) {
    this.items = Immutable.fromJS(items)
  }

  handleAddItem(item) {
    this.items = this.items.push(Immutable.fromJS(item))
  }
}

export default Alt.createStore(ListStore, 'ListStore');<commit_msg>Makes ListStore listen to action to remove items from list.<commit_after>import Immutable from 'immutable';

import Alt from '../Alt';
import ListActions from '../actions/ListActions';

class ListStore {
  constructor() {
    this.items = Immutable.List();

    this.bindListeners({
      handleUpdateItems: ListActions.UPDATE_ITEMS,
      handleAddItem: ListActions.ADD_ITEM,
      handleRemoveItem: ListActions.REMOVE_ITEM
    });
  }

  handleUpdateItems(items) {
    this.items = Immutable.fromJS(items)
  }

  handleAddItem(item) {
    this.items = this.items.push(Immutable.fromJS(item))
  }

  handleRemoveItem(index) {
    this.items = this.items.delete(index)
  }
}

export default Alt.createStore(ListStore, 'ListStore');
{'fraction_non_alphanumeric': 0.12074303405572756, 'fraction_numerical': 0.0, 'mean_word_length': 3.935114503816794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7425949', 'n_tokens_mistral': 403, 'n_tokens_neox': 398, 'n_words': 77}