{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScriptSamples/issues/62","labels_url":"https://api.github.com/repos/Microsoft/TypeScriptSamples/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScriptSamples/issues/62/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScriptSamples/issues/62/events","html_url":"https://github.com/Microsoft/TypeScriptSamples/pull/62","id":118253865,"number":62,"title":"Port React to 0.13.3 to 0.14.3","user":{"login":"johnnyreilly","id":1010525,"avatar_url":"https://avatars.githubusercontent.com/u/1010525?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyreilly","html_url":"https://github.com/johnnyreilly","followers_url":"https://api.github.com/users/johnnyreilly/followers","following_url":"https://api.github.com/users/johnnyreilly/following{/other_user}","gists_url":"https://api.github.com/users/johnnyreilly/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyreilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyreilly/subscriptions","organizations_url":"https://api.github.com/users/johnnyreilly/orgs","repos_url":"https://api.github.com/users/johnnyreilly/repos","events_url":"https://api.github.com/users/johnnyreilly/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyreilly/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-22T09:53:21Z","updated_at":"2015-11-22T09:59:48Z","closed_at":"2015-11-22T09:59:48Z","pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScriptSamples/pulls/62","html_url":"https://github.com/Microsoft/TypeScriptSamples/pull/62","diff_url":"https://github.com/Microsoft/TypeScriptSamples/pull/62.diff","patch_url":"https://github.com/Microsoft/TypeScriptSamples/pull/62.patch"},"body":"This PR ports react 0.13.3 to 0.14.3 which should handle the issues raised in https://github.com/Microsoft/TypeScriptSamples/issues/61\r\n\r\nAll works fine / tests pass.  One quirk; I'm having to capture the `React` variable in each module like so:\r\n\r\n```\r\nimport * as React from 'react';\r\n\r\n// ....\r\n\r\nconst __react = React; // only in place to prevent React being purged from dependencies as not used directly\r\n```\r\n\r\nWithout it the `React` is not loaded.  I'm guessing this is because ts-loader is performing an optimisation here; saying \"well, they didn't use React directly so they must not need it\".  \r\n\r\n@jbrantly is that right?   Would you be able to advise if there is a better way around this than what I've done here?  (I know you pretty much handled the port of React typings to 0.14).\r\n\r\nJust to be clear, the PR is safe to merge but it would be nice to find out if the workaround could be replaced with something a little nicer."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScriptSamples/issues/comments/158742155","html_url":"https://github.com/Microsoft/TypeScriptSamples/pull/62#issuecomment-158742155","issue_url":"https://api.github.com/repos/Microsoft/TypeScriptSamples/issues/62","id":158742155,"user":{"login":"johnnyreilly","id":1010525,"avatar_url":"https://avatars.githubusercontent.com/u/1010525?v=3","gravatar_id":"","url":"https://api.github.com/users/johnnyreilly","html_url":"https://github.com/johnnyreilly","followers_url":"https://api.github.com/users/johnnyreilly/followers","following_url":"https://api.github.com/users/johnnyreilly/following{/other_user}","gists_url":"https://api.github.com/users/johnnyreilly/gists{/gist_id}","starred_url":"https://api.github.com/users/johnnyreilly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnnyreilly/subscriptions","organizations_url":"https://api.github.com/users/johnnyreilly/orgs","repos_url":"https://api.github.com/users/johnnyreilly/repos","events_url":"https://api.github.com/users/johnnyreilly/events{/privacy}","received_events_url":"https://api.github.com/users/johnnyreilly/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T09:59:48Z","updated_at":"2015-11-22T09:59:48Z","body":"oops missed something..."}}