コード例 #1
0
ファイル: ItemStore.js プロジェクト: bradparks/react-hn
function handleUpdateItems(items) {
  items.forEach(function(item) {
    if (item.deleted || item.error) {
      return
    }
    if (item.type == 'comment') {
      commentUpdates[item.id] = item
    }
    else {
      storyUpdates[item.id] = item
    }
  })

  sortedCommentUpdates = updateCache(commentUpdates)
  sortedStoryUpdates = updateCache(storyUpdates)

  ItemStore.emitUpdates()
}