-
Notifications
You must be signed in to change notification settings - Fork 47k
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
CSSTransitionGroup throws when a child returns null from render #2619
Comments
This was probably fixed by #2503. |
I don't think this is solved. It's easy to reproduce with React 0.12.2: just have the child return |
Yup ran into this as well. If you pass a component to ReactCSSTransitionGroup that renders null you get this exception. Using React 0.12.1 |
@spicyj Can you please reopen? |
i've get the same exception, too. Hope this will be fixed soon. |
@spicyj is there anything stopping you people from implementing the suggested fix? :) |
I'm encountering a similar issue. |
I guess a PR would be welcome? |
@gaearon yeah, there is is! |
I'm still seeing this issue. And can verify that it only happens when I return null. React with addons v0.13.3 |
Yes, the fix is in 0.14. |
Ahh.. well that would explain things. How can I get my hands on 0.14? |
Sorry – not released yet, but hopefully in the next few weeks. 0.14-beta is on npm (see the React blog). |
I came across this, when using
react-router
. When loading a route initially where the route handler is actually inside aReactCSSTransitionGroup
and then removing it from the transition group leads to anUncaught TypeError: Cannot read property 'addEventListener' of null
. The weird thing is that it only happens on initial load of a nested route, not when the same view is being pulled up via the menu. I'm not sure if this is an issue relatedreact-router
or if it belongs toreact
. But the thing is that theRouteHandler
component either returns a react element, or it returnsnull
. It seems like an edge case maybe, because it only happens in this specific initial render setup.It could be fixed, by adding a guard to the
transition()
method ofReactCSSTransitionGroupChild
:The text was updated successfully, but these errors were encountered: