question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReactTransitionGroup - Using with JQuery cause Uncaught TypeError: Cannot read property 'componentDidLeave' of undefined

See original GitHub issue

Hi Please take a look at this https://jsfiddle.net/pvtb9jbt/ After adding some items, please click remove and see the console.log

Uncaught TypeError: Cannot read property 'componentDidLeave' of undefined
React.createClass._handleDoneLeaving @

This is cause from

 _handleDoneLeaving: function (key) {
        var component = this.refs[key];

        if (component.componentDidLeave) { //From this line
          component.componentDidLeave();
        }
}

Can we check

 if (component && component.componentDidLeave) {
    component.componentDidLeave();
 }

Thanks !

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lovedotacommented, Dec 15, 2015

@spicyj It is not fixed. Please check http://jsfiddle.net/lovedota/pvtb9jbt/

0reactions
gaearoncommented, Jan 27, 2017

I’m going to close since we don’t plan any more changes to TransitionGroup in React repo. Instead, it now is maintained by the community, and you can file an issue in the new repository if this is still affecting you. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React 18 + CSSTransition makes error : TypeError: Cannot ...
I found solution here, i changed my routing as in example http://reactcommunity.org/react-transition-group/with-react-router.
Read more >
ReactTransitionGroup.js:116 `Uncaught TypeError: Cannot ...
Example 0.14.0 Animation | React / Fork by React Base Fiddle ... TypeError: Cannot read property 'componentDidAppear' of undefined #5240.
Read more >
Using jQuery to countdown from 90 seconds beginning on the ...
I am trying to create a simple card game using html css and . ... Uncaught TypeError: Cannot read property 'msie' of undefined...
Read more >
jQuery and Ajax Tutorial
jQuery provides a powerful and supercharged selector function to select elements based on HTML tag-names (e.g., <p> , <button> ), HTML ID attribute...
Read more >
Animation Add-Ons - React
The ReactTransitionGroup add-on component is a low-level API for animation, ... You can use these classes to trigger a CSS animation or transition....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found