-
Notifications
You must be signed in to change notification settings - Fork 80
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
Transition group import problem #131
Comments
Just noticed this happens with
|
This is because react is being used as an external. if you want to use it as an external, you need to include react with addons and and map react-addons-css-transition-group to React.addons.CSSTransitionGroup. see: facebook/react#6343 |
We might be able to do away with transition group in favor of |
Leaving this ticket around because we want to move away from css transition group |
React.addons.CSSTransitionGroup has been depreciated in favor of https://github.com/reactjs/react-transition-group which is now being actively maintained and solves many of these problems |
We recently encountered a strange bug where one of our users with webpack ran into the dreaded
Only a ReactOwner can have refs
error when importing theBanner
component. After further investigation, we found that the problem was withreact-addons-css-transition-group
and the way it importsreact
.Turns out that
react-addons-css-transition-group
is simply a pointer back to the react repo. For some reason during transpilation (or something) it's turning that intorequire('./React')
which webpack considers a different modules than regularreact
. Ultimately this can lead to multiple copies of react being imported in our client libraries.We found a temporary fix which was to add the following line to the
externals
section of the webpack config:I'm not sure how to fix this. I wonder if part of the problem is that we're requiring transition groups as a regular
dependency
instead of a peer dep.The text was updated successfully, but these errors were encountered: