I have a table with 50 rows, each row is an item from a list.
I want to set the item as selected when I click on a checkbox in the row.
By doing it, I see that all the 50 rows are rerender.
How can I set only the specific item? (Without shouldcomponentupdate).
case ITEM_SELECTED:
const items = fromJS(state.items)
items.update(
items.findIndex(function(item) {
return item._id == action.id;
}), function(item) {
return item.selected = action.selected;
}
);
return {
...state,
items: items.toJS()
}
Thanks :)