title: Building a partial state inside an action to update a REST API
body: <p>I have a bound action:</p>
  
  <pre><code>updateAge(age)
  </code></pre>
  
  <p>Part of my state is this: </p>
  
  <pre><code>//user data
  user {
     name: 'foo',
     age: 10
  }
  </code></pre>
  
  <p>In my action creator, can I do something like this? </p>
  
  <pre><code>export const updateAge = (age) =&gt; (dispatch, getState) =&gt; { 
     let currentState = { ...getState().user, age }
     dispatch(updateUser(currentState)) //updates API
  }
  </code></pre>
  
  <p>This would save work on my back end as I would just have one route handling all user updates. </p>
  
  <pre><code>router.post('/user'....)
  </code></pre>
  
  <p>As long as I make sure only one fetch/post happens at any given time, is this a good pattern?  What are the pros and cons?  </p>