Each file should define a single (i.e. one) React component.
Expose a single state attribute named data that is an immutable map.
When state changes, rebuild the immutable map.
getInitialState: function () {
return { data: Immutable.Map({ ... }); }
}
I recommend not assigning things to window. Using WebPack gives you commonjs or even es2015 modular code. Also I personally assign Custom component methods with a _ prefix... when components get a little large or complex it makes it much easier to see/read IMHO