React doesn't observe your object for changes and doesn't have to. When you call setState
, you are effectively asking react to change the component's state and re-render it. The setState
will update that subtree rather than the whole app.
Removing one or two keys has zero impact on React, or in JS in general. In case you didn't know, <MyComp a="h" b="e" />
desugars to MyComp({a: 'h', b: 'e'})
.
If you're trying to pass down a global obj solely for the sake of perf, then don't bother; you don't be saving milliseconds there. But yes, you can keep your components down the tree as stateless as possible as a good practice.