{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/485","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/485/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/485/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/485/events","html_url":"https://github.com/erikras/redux-form/issues/485","id":124343326,"number":485,"title":"`initialValues` dispatches two actions in deep forms","user":{"login":"mohebifar","id":6104558,"avatar_url":"https://avatars.githubusercontent.com/u/6104558?v=3","gravatar_id":"","url":"https://api.github.com/users/mohebifar","html_url":"https://github.com/mohebifar","followers_url":"https://api.github.com/users/mohebifar/followers","following_url":"https://api.github.com/users/mohebifar/following{/other_user}","gists_url":"https://api.github.com/users/mohebifar/gists{/gist_id}","starred_url":"https://api.github.com/users/mohebifar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohebifar/subscriptions","organizations_url":"https://api.github.com/users/mohebifar/orgs","repos_url":"https://api.github.com/users/mohebifar/repos","events_url":"https://api.github.com/users/mohebifar/events{/privacy}","received_events_url":"https://api.github.com/users/mohebifar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-30T12:48:37Z","updated_at":"2015-12-30T19:23:45Z","closed_at":null,"body":"I use server-side rendering in a project and in a form, there should be a `tickets[]` field with some array default value which comes from redux state. As a result of which, let's say the given array has two values, I must see two inputs with the following code:\r\n\r\n```jsx\r\n@reduxForm({\r\n  form: 'testForm',\r\n  fields: ['tickets[]', 'nonArrayValue']\r\n}, state => ({ initialValues: state.folan.defaultTickets }))\r\nclass TestFormComponent extends Component {\r\n  render() {\r\n    return (<div>\r\n      {this.props.fields.tickets.map(ticket => <input type=\"text\" {...ticket} />)}\r\n    </div>);\r\n  }\r\n}\r\n```\r\n\r\nIt works well when there is no server-side rendering. But on the server, it seems that `tickets` array is empty. I logged the `tickets` value in the `render()` method then I checked the log on the browser's console and I realized that the component gets rendered two times. The first time, `tickets` is empty while other non-array values have a `defaultValue`. The second log shows that the `tickets` array has the correct value.\r\n\r\n![Log preview](https://cloud.githubusercontent.com/assets/6104558/12050825/b7d0e6f4-af0f-11e5-818d-52d92e85e47e.png)\r\n\r\nI also tried to defer rendering the component until an `INITIALIZE` action gets dispatched. It didn't work as well."},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/168059601","html_url":"https://github.com/erikras/redux-form/issues/485#issuecomment-168059601","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/485","id":168059601,"user":{"login":"mohebifar","id":6104558,"avatar_url":"https://avatars.githubusercontent.com/u/6104558?v=3","gravatar_id":"","url":"https://api.github.com/users/mohebifar","html_url":"https://github.com/mohebifar","followers_url":"https://api.github.com/users/mohebifar/followers","following_url":"https://api.github.com/users/mohebifar/following{/other_user}","gists_url":"https://api.github.com/users/mohebifar/gists{/gist_id}","starred_url":"https://api.github.com/users/mohebifar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohebifar/subscriptions","organizations_url":"https://api.github.com/users/mohebifar/orgs","repos_url":"https://api.github.com/users/mohebifar/repos","events_url":"https://api.github.com/users/mohebifar/events{/privacy}","received_events_url":"https://api.github.com/users/mohebifar/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T19:23:45Z","updated_at":"2015-12-30T19:23:45Z","body":"I created [this simple gist](https://gist.github.com/mohebifar/d22bd3bf123f57367c83). Maybe it clears out the issue."}}