title: React Redux use HOC with connected component
body: <p>I am in the middle of my first React Native project. I would like to create a HOC that deals purely with syncing data from an api. This would then wrap all my other components.</p>
  
  <p>If I am correct my <code>DataSync</code> component would enhance all other components by doing the following in the export statement:</p>
  
  <p><code>export default DataSync(SomeOtherComponent);</code></p>
  
  <p>The concept I am struggling with is that <code>SomeOtherComponent</code> also depends on the React Redux Connect method for retrieving other redux state. My question is how can I use both together? Something like this?</p>
  
  <p><code>export default DataSync(connect(mapStateToProps, mapDispatchToProps)(SomeOtherComponent));</code></p>
  
  <p>I may have completely misunderstood the concept here so I would really appreciate some pointers</p>
  
  <p>EDIT</p>
  
  <p>To explain further:</p>
  
  <p>My DataSync HOC would purely handle the syncing of data between the app and would be the top level component. It would need access to auth state and would set the data in Redux (in this case orders) for all other components.</p>
  
  <p>Components nested within the DataSync HOC need access to the retrieved data, routes and they in turn create state (orders) that must be synced back to the server periodically.</p>