Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose React.addons.* as react/addons/* on npm and deprecate react/addons #3780

Closed
sophiebits opened this issue Apr 29, 2015 · 5 comments
Closed

Comments

@sophiebits
Copy link
Collaborator

The current system of packaging react/addons isn't great because you need to pull in all the addons even if you just want to use one of them. Instead, let's make it so you can do require('react/addons/TransitionGroup') and similar.

This should be as simple as adding a few files to build/npm-react that require the (private) internal modules.

// npm-react/addons/TransitionGroup.js
module.exports = require('../lib/ReactTransitionGroup.js');
@zpao
Copy link
Member

zpao commented Apr 29, 2015

cc @gaearon @iamdustan. This came out of the Twitter discussion as a possible way to start migrating to requiring of a single addon in a condoned way (without reaching directly into lib/) that shouldn't screw up other packaging.

@pspeter3
Copy link

This would be greatly appreciated.

@gaearon
Copy link
Collaborator

gaearon commented Apr 29, 2015

Sounds like a good plan to me!

@iamdustan
Copy link
Contributor

@zpao @spicyj should I update the docs with this change as well?

@sophiebits
Copy link
Collaborator Author

Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants