I\'m quite new to React.JS and I am in the process of experimenting by building a masonry-style layout.
I render each element to the DOM, then I need to loop over eac
Something like:
getInitialState: function() {
return {
something: { x: 0, y: 0 },
blah: 10
};
}
var state = Object.assign(this.state, {
something: Object.assign(this.state.something, { y: 50 }),
});
this.setState(state);
Would be better if it was recursive/deep rather than hard coding the tree, but I will leave that up to the reader :)