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

Using react and react/addons side-by-side provokes Invariant errors with Browserify #2326

Closed
alexkirsz opened this issue Oct 11, 2014 · 2 comments

Comments

@alexkirsz
Copy link
Contributor

Using require('react') and require('react/addons') in different modules provoke Invariant errors when mixed together. So you have to only use either react or react/addons. Components required from react/lib/* also provoke Invariant errors when used inside components from react.

This a regression, since react-addons was made specifically for this reason, and has since been marked as deprecated.

@zpao
Copy link
Member

zpao commented Oct 13, 2014

Can you construct a complete simplified example? I don't think this should be happening (since react/addons just requires the same thing react does and then adds a couple more properties).

@alexkirsz
Copy link
Contributor Author

Okay, this is due to the fact that I'm bundling React in a separate libs.js bundle, and I'm currently doing bundle.require('react').require('react/addons'), where react and react/addons are two different copies of React.

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

No branches or pull requests

2 participants