{"action":"opened","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/84","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/84/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/84/events","html_url":"https://github.com/erikras/redux-form/issues/84","id":107412138,"number":84,"title":"Application Lifecycle?","user":{"login":"asaf","id":14259,"avatar_url":"https://avatars.githubusercontent.com/u/14259?v=3","gravatar_id":"","url":"https://api.github.com/users/asaf","html_url":"https://github.com/asaf","followers_url":"https://api.github.com/users/asaf/followers","following_url":"https://api.github.com/users/asaf/following{/other_user}","gists_url":"https://api.github.com/users/asaf/gists{/gist_id}","starred_url":"https://api.github.com/users/asaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaf/subscriptions","organizations_url":"https://api.github.com/users/asaf/orgs","repos_url":"https://api.github.com/users/asaf/repos","events_url":"https://api.github.com/users/asaf/events{/privacy}","received_events_url":"https://api.github.com/users/asaf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-20T19:32:25Z","updated_at":"2015-09-20T19:32:25Z","closed_at":null,"body":"Hey,\r\n\r\nI have a dumb component with a form within it (lets call it `ContactForm`),\r\nA redux connected passes some property from state to the dump component. (lets call it `ContactContainer`)\r\n\r\nTo initially load the form in `ContactForm`, I'm doing:\r\n\r\n```js\r\n//initialize the form with the new contact object if it was changed.\r\ncomponentWillUpdate(nextProps) {\r\n    if (this.props.contact !== nextProps.contact && nextProps.contact) {\r\n      const { initializeForm, contact } = nextProps;\r\n      initializeForm(contact);\r\n    }\r\n}\r\n```\r\n\r\nIn `ContactContainer` I do something like:\r\n```js\r\ncomponentWillMount() {\r\n   //loadData is a dispatched action.\r\n    this.loadData(this.props);\r\n}\r\n```\r\n\r\nRedux eventually, at some point publishes the change to `ContactContainer`, which eventually re-renders the `ContactForm` with the new data, `ContactForm:componentWillUpdate` is invoked with a change and form is initialized.\r\n\r\n\r\nBut sometimes...... it seems like `ContactForm:componentWillUpdate` is not invoked at all, this is because Redux was quick enough to process the state changes before the Form component is mounted thus `ContactForm:componentWillUpdate` is not invoked at all.\r\n\r\nSo I found myself adding in `ContactForm`:\r\n\r\n```js\r\ncomponentWillMount() {\r\n    if (this.props.contact) {\r\n      this.props.initializeForm(this.props.contact);\r\n    }\r\n  }\r\n```\r\n\r\nBut it smells wrong....\r\n\r\n@gaearon This question is not only relevant to the forms,  if you got a moment to say something about this it'll be great, Redux docs looks good at this stage and I know Redux is not a full stack (and I like the freedom of Redux that is still kept properly since your initial commit few months ago!), but if you look at full stacks such EmberJs, Angular, etc, the documentation always explains the full lifecycle (route -> data loading -> controller initialization -> components -> templates, etc...), I think it's worth putting more explanation here.\r\n\r\n\r\nThanks!"}}