{"action":"created","issue":{"url":"https://api.github.com/repos/trueadm/inferno/issues/251","repository_url":"https://api.github.com/repos/trueadm/inferno","labels_url":"https://api.github.com/repos/trueadm/inferno/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/trueadm/inferno/issues/251/comments","events_url":"https://api.github.com/repos/trueadm/inferno/issues/251/events","html_url":"https://github.com/trueadm/inferno/issues/251","id":162870314,"number":251,"title":"make inferno-component independent from browser environment","user":{"login":"edoroshenko","id":1292187,"avatar_url":"https://avatars.githubusercontent.com/u/1292187?v=3","gravatar_id":"","url":"https://api.github.com/users/edoroshenko","html_url":"https://github.com/edoroshenko","followers_url":"https://api.github.com/users/edoroshenko/followers","following_url":"https://api.github.com/users/edoroshenko/following{/other_user}","gists_url":"https://api.github.com/users/edoroshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/edoroshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edoroshenko/subscriptions","organizations_url":"https://api.github.com/users/edoroshenko/orgs","repos_url":"https://api.github.com/users/edoroshenko/repos","events_url":"https://api.github.com/users/edoroshenko/events{/privacy}","received_events_url":"https://api.github.com/users/edoroshenko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-29T08:39:29Z","updated_at":"2016-06-29T12:37:25Z","closed_at":"2016-06-29T12:37:25Z","body":"When in node.js I try\r\n```js\r\nvar Component = require('inferno-component');\r\n```\r\nthen I get\r\n```\r\nReferenceError: window is not defined\r\n```\r\nThat happens because `inferno-component` requires `Lifecycle` from `inferno-dom`, that depends on browser environment.\r\nWhat I propose to do is to make `inferno-component` independent from browser environment or maybe to create a separate of `inferno-component`, that is designed only for server-side initial rendering. It doesn't have to support DOM-specific lifecycle events and should simply ignore them.\r\n\r\nNow I fix the issue this way\r\n```js\r\nconst jsdom = require('jsdom');\r\nconst document = jsdom.jsdom( '<!doctype html><html><body></body></html>' );\r\nconst window = document.defaultView;\r\n\r\nObject.assign(global, {\r\n\tdocument,\r\n\twindow,\r\n\tnavigator: window.navigator,\r\n\tusingJSDOM: true\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/trueadm/inferno/issues/comments/229343126","html_url":"https://github.com/trueadm/inferno/issues/251#issuecomment-229343126","issue_url":"https://api.github.com/repos/trueadm/inferno/issues/251","id":229343126,"user":{"login":"trueadm","id":1519870,"avatar_url":"https://avatars.githubusercontent.com/u/1519870?v=3","gravatar_id":"","url":"https://api.github.com/users/trueadm","html_url":"https://github.com/trueadm","followers_url":"https://api.github.com/users/trueadm/followers","following_url":"https://api.github.com/users/trueadm/following{/other_user}","gists_url":"https://api.github.com/users/trueadm/gists{/gist_id}","starred_url":"https://api.github.com/users/trueadm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueadm/subscriptions","organizations_url":"https://api.github.com/users/trueadm/orgs","repos_url":"https://api.github.com/users/trueadm/repos","events_url":"https://api.github.com/users/trueadm/events{/privacy}","received_events_url":"https://api.github.com/users/trueadm/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T12:37:25Z","updated_at":"2016-06-29T12:37:25Z","body":"Awesome, closing now :)"}}
{"actor":{"display_login":"trueadm"}}