This is probably something that Ruby does better, but is there a better way to write this Javascript code (for React):
handleCellChange: function(rowIdx, prop, val) {
var updateObj = {};
updateObj.data = {};
updateObj.data[rowIdx] = {};
updateObj.data[rowIdx][prop] = { $set: val };
var newState = React.addons.update(this.state, updateObj);