{"action":"created","issue":{"url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/5660","labels_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/5660/labels{/name}","comments_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/5660/comments","events_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/5660/events","html_url":"https://github.com/borisyankov/DefinitelyTyped/pull/5660","id":104616888,"number":5660,"title":"Bring react and react-addons together to make it easier for other libraries.","user":{"login":"ngbrown","id":228987,"avatar_url":"https://avatars.githubusercontent.com/u/228987?v=3","gravatar_id":"","url":"https://api.github.com/users/ngbrown","html_url":"https://github.com/ngbrown","followers_url":"https://api.github.com/users/ngbrown/followers","following_url":"https://api.github.com/users/ngbrown/following{/other_user}","gists_url":"https://api.github.com/users/ngbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/ngbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngbrown/subscriptions","organizations_url":"https://api.github.com/users/ngbrown/orgs","repos_url":"https://api.github.com/users/ngbrown/repos","events_url":"https://api.github.com/users/ngbrown/events{/privacy}","received_events_url":"https://api.github.com/users/ngbrown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-09-03T03:57:37Z","updated_at":"2015-09-07T13:16:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/pulls/5660","html_url":"https://github.com/borisyankov/DefinitelyTyped/pull/5660","diff_url":"https://github.com/borisyankov/DefinitelyTyped/pull/5660.diff","patch_url":"https://github.com/borisyankov/DefinitelyTyped/pull/5660.patch"},"body":"Bring react and react-addons together to make it easier for other libraries to depend on just 'react' and the user can optionally use `require('react/addons')` without conflict.  Uses ES6 modules and re-exports to accomplish this.\r\n\r\nThis has a breaking change in that the additional types in react-addons are now under the `.addons.` module.  For example, where it used to be `React.LinkedStateMixin` it now is `React.addons.LinkedStateMixin`.  This is only true for the interface definition.  The actual mixin variable was already `React.addons.LinkedStateMixin`."},"comment":{"url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/comments/138295401","html_url":"https://github.com/borisyankov/DefinitelyTyped/pull/5660#issuecomment-138295401","issue_url":"https://api.github.com/repos/borisyankov/DefinitelyTyped/issues/5660","id":138295401,"user":{"login":"jbrantly","id":196944,"avatar_url":"https://avatars.githubusercontent.com/u/196944?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrantly","html_url":"https://github.com/jbrantly","followers_url":"https://api.github.com/users/jbrantly/followers","following_url":"https://api.github.com/users/jbrantly/following{/other_user}","gists_url":"https://api.github.com/users/jbrantly/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrantly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrantly/subscriptions","organizations_url":"https://api.github.com/users/jbrantly/orgs","repos_url":"https://api.github.com/users/jbrantly/repos","events_url":"https://api.github.com/users/jbrantly/events{/privacy}","received_events_url":"https://api.github.com/users/jbrantly/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T13:16:35Z","updated_at":"2015-09-07T13:16:35Z","body":"@johnnyreilly I hope this isn't rude but did you see #5579?\r\n\r\nI still have the concern of everything now pulling in the global React namespace. That was something that @vsiao and @pspeter3 and I had explicitly tried to avoid. However, I completely understand that most existing definitions don't do what we do, so when in Rome.\r\n\r\nOn a side note, I somewhat recently did the same thing you are about to do. I wrote up a [blog post](http://www.jbrantly.com/es6-modules-with-typescript-and-webpack/) that might be helpful to you since you're using ES6 modules + Babel. For the React definitions, all I did was change\r\n\r\n```typescript\r\ndeclare module \"react\" {\r\n    export = __React;\r\n}\r\n```\r\n\r\nto\r\n\r\n```typescript\r\ndeclare module \"react\" {\r\n    export default __React;\r\n}\r\n```\r\n\r\nAnd then use `import React from 'react'` syntax. If you want to use `import { Component } from 'react'` or something then you'd need to do more work (blog post has details)."}}