title: Usage of Redux Form Fields component inside a FieldArray component
body: <p>I have a <code>Fields</code> component that I am trying to use sometimes by itself and sometimes from inside a <code>FieldArray</code> component. I have added a snippet below with a simplified model.</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { createStore, combineReducers } from 'redux';
  import { Provider } from 'react-redux';
  import { reduxForm, Fields, FieldArray, reducer as formReducer } from 'redux-form';
  
  const reducers = {
    form: formReducer
  };
  
  const reducer = combineReducers(reducers);
  
  const store = createStore(reducer);
  
  const renderSharedComponent = (fields) =&gt; {
    console.log(fields);
    return (&lt;div&gt;Shared Component&lt;/div&gt;);
  };
  
  const renderHashes = ({ fields }) =&gt; (
    &lt;div&gt;
      {
        fields.map((field) =&gt; (
          &lt;Fields
            key={ field }
            names={ [`${field}.value`, `${field}.valueIsRegex`] }
            component={ renderSharedComponent }
          /&gt;
        ))
      }
    &lt;/div&gt;
  );
  
  const ReactComponent = () =&gt; (
    &lt;div&gt;
      &lt;FieldArray
        name="hashes"
        component={ renderHashes }
      /&gt;
      &lt;Fields
        names={ ['value', 'valueIsRegex'] }
        component={ renderSharedComponent }
      /&gt;
    &lt;/div&gt;
  );
  
  const ReduxForm = reduxForm({
    form: 'default',
    initialValues: {
      hashes: [{}]
    }
  })(ReactComponent);
  
  ReactDOM.render((
    &lt;div&gt;
      &lt;Provider store={ store }&gt;
        &lt;ReduxForm /&gt;
      &lt;/Provider&gt;
    &lt;/div&gt;
  ), document.getElementById('content'));
  </code></pre>
  
  <p>When I use the <code>Fields</code> component by itself, the <code>fields</code> argument from inside <code>renderSharedComponent</code> has the following form:</p>
  
  <pre><code>{
    value: { input: {...}, meta: {...} },
    valueIsRegex: { input: {...}, meta: {...} },
    names: [ 'value' , 'valueIsRegex' ]
  } 
  </code></pre>
  
  <p>When I use the <code>Fields</code> component inside a <code>FieldArray</code> component, the <code>fields</code> argument from inside <code>renderSharedComponent</code> has the following form:</p>
  
  <pre><code>{
    hashes: [
        {
          value: { input: {...}, meta: {...} },
          valueIsRegex: { input: {...}, meta: {...} }
        }
    ],
    names: [ 'hashes[0].value' , 'hashes[0].valueIsRegex' ]
  } 
  </code></pre>
  
  <p>If I will be using the <code>Fields</code> component inside a <code>FieldArray</code> component with a different name (let's say <code>paths</code>) the names property will change accordingly (eg. <code>names: [ 'paths[0].value' , 'paths[0].valueIsRegex' ]</code>).</p>
  
  <p>I am trying to get the <code>value</code> and <code>valueIsRegex</code> objects in a generic way that will support any of the cases I presented above.</p>
  
  <p>Right now I have created a function where I use a RegEx to determine the fields. But I was wondering if anyone knows a better way to do this (maybe there is a Redux Form util that maybe I missed when reading the documentation). </p>