-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hey, so after reading a bunch about react and checking out Pete Hunt's react demo, it seems that React was built with the intention of "pure" components with immutable state. I think the only reason they included this.state is to deal with forms, validation, etc.
Anyways, the mixin you wrote makes a lot of sense from a meteor perspective and when combined with react gives more fine-grained re-rendering. However, now your react components have mutable state and they're no longer pure. This makes it hard to distinguish between a non-pure Player component that accepts a playerId and fetches the name and score. And a pure Player component that accepts a player object and renders the object's name and score.
Honestly, I'm uncomfortable with the pure version, but it seems that the beauty of react is this super fact reconciliation algorithm. Based on pete hunt's demo and his global autorun method, it seems they want you to treat react strictly as a rendering engine.
Anyways, I'm curious if you had any thoughts on this tradeoff...