{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react/issues/3620","labels_url":"https://api.github.com/repos/facebook/react/issues/3620/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react/issues/3620/comments","events_url":"https://api.github.com/repos/facebook/react/issues/3620/events","html_url":"https://github.com/facebook/react/issues/3620","id":67093922,"number":3620,"title":"document is not defined on server","user":{"login":"bishtawi","id":721309,"avatar_url":"https://avatars.githubusercontent.com/u/721309?v=3","gravatar_id":"","url":"https://api.github.com/users/bishtawi","html_url":"https://github.com/bishtawi","followers_url":"https://api.github.com/users/bishtawi/followers","following_url":"https://api.github.com/users/bishtawi/following{/other_user}","gists_url":"https://api.github.com/users/bishtawi/gists{/gist_id}","starred_url":"https://api.github.com/users/bishtawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bishtawi/subscriptions","organizations_url":"https://api.github.com/users/bishtawi/orgs","repos_url":"https://api.github.com/users/bishtawi/repos","events_url":"https://api.github.com/users/bishtawi/events{/privacy}","received_events_url":"https://api.github.com/users/bishtawi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-04-08T09:57:48Z","updated_at":"2015-07-26T07:02:55Z","closed_at":null,"body":"I saw there was a bug for this a year ago (facebook/react#1866) and it was fixed. I am encountering it now on 0.13.1. \r\n\r\nI am running react on the server to generate html. On one of my parent components I have a variable whose value cannot be determined until it reaches some child component. So I need to implement some way for a child component to pass back data to its parent. I read https://facebook.github.io/react/tips/communicate-between-components.html and I implemented it:\r\n\r\nParent component passes callback function as a prop to child component.\r\nChild component calls callback in componentWillMount function (also tested calling callback in getInitialState).\r\nCallback calls setState to update state variable in parent.\r\n\r\nThis does not work serverside as an exception is thrown about document not being defined."},"comment":{"url":"https://api.github.com/repos/facebook/react/issues/comments/124951869","html_url":"https://github.com/facebook/react/issues/3620#issuecomment-124951869","issue_url":"https://api.github.com/repos/facebook/react/issues/3620","id":124951869,"user":{"login":"andreimc","id":1446134,"avatar_url":"https://avatars.githubusercontent.com/u/1446134?v=3","gravatar_id":"","url":"https://api.github.com/users/andreimc","html_url":"https://github.com/andreimc","followers_url":"https://api.github.com/users/andreimc/followers","following_url":"https://api.github.com/users/andreimc/following{/other_user}","gists_url":"https://api.github.com/users/andreimc/gists{/gist_id}","starred_url":"https://api.github.com/users/andreimc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreimc/subscriptions","organizations_url":"https://api.github.com/users/andreimc/orgs","repos_url":"https://api.github.com/users/andreimc/repos","events_url":"https://api.github.com/users/andreimc/events{/privacy}","received_events_url":"https://api.github.com/users/andreimc/received_events","type":"User","site_admin":false},"created_at":"2015-07-26T07:02:55Z","updated_at":"2015-07-26T07:02:55Z","body":"thanks @ericclemmons "}}