title: The role of keys in a react-redux app and managing the state of dynamic components
body: <p>I understand basically what keys are for: we need to be able to identify changes in a list of children. </p>
  
  <p>What I'm having trouble with is the information flow, and maintaining synchronicity between the states in my store and the states of subcomponents. </p>
  
  <p>For example, say I have a list of <code>&lt;CustomTextInput&gt;</code> which is exactly what it sounds like. Some container with a text input inside of it. Many of them are stored in some <code>&lt;CustomTextInputList&gt;</code> element. </p>
  
  <p>The number of <code>CustomTextInput</code>s in the list can change, they can be added and subtracted. I have a factory with an incrementing counter that issues new keys every time a CustomTextInput is inserted, no matter where it's placed. </p>
  
  <p>I have a <code>CustomTextInputModel</code> type which populates my store. Whenever I change the value inside one of the inputs, it needs to call a callback which dispatches actions in my store. But then how do I know which one to modify, and how can I be sure that the whole list doesn't rerender from changing a single instance since the entire store's state is being recreated? Do I need to store a reference to some model ID in every <code>CustomTextInput</code>? Should this be the key? </p>
  
  <p>Manythanks, I'm very new at this :)</p>