Q:

setState on owner/parent vs ownee/individual children

I have the following view Hierarchy,
<Container>
 <OrderList data="orders" >
  <Order data={orders[0]} />
  <Order data={orders[1]} />
  <Order data={orders[2]} />
  ...
 </OrderList>

 <OrderList data="orders" >
  <Order data={orders[0]} />
  <Order data={orders[1]} />
  <Order data={orders[2]} />
  ...
 </OrderList>
 ....
</Container>

Updates for individual orders come in via pusher.
I am new to React and want to know which of the following is a good way to update the already mounted component
a) All updates to orders under an OrderList is handled by a function in OrderList component 
function handleChange(order_index, updated_order){
  var orders = _.clone(this.state.orders);
  orders[order_index] = updated_order
  this.setState(orders);
}

v/s
b) Update to an order is handled by a function in Order component
function handleChange(updated_order){
      this.setState({order: updated_order});
   }

A:

As Felix has mentioned with React you should always try and find the "common owner" for where your state should live. Ideally you should have any state as high in the hierarchy as possible as this allows data to pass in a single direction down through props.
React have a great page on this which will hopefully clarify this for you (specifically take a look at step 4): Thinking in React
So in your specific example your OrderList component would contain the list of your orders - (option a of your choices). Then when you get an event to update 1 or many orders you simply modify the state on OrderList which will trigger an update, pass the new data down to your Order which would also update and re-render.
What this does is make your Order component much more "pure" in theory (although react "pure" only deals with shallow props at the moment). It is simply given some data (via props) and renders itself. Ie. it doesn't need to worry about when to update, it's more akin to a simple template and one which can more easily optimize when it should actually bother updating (when props differs)

