Reactjs: compare through object identity instead of id

I've made 2 small changes, so that the code reflects the use of the immutable data. The immutable data means we can compare by object identity instead of id.