CSSTransitionGroup demo not working with react-lazyload@2.0
See original GitHub issueI was trying to get the CSSTransitionDemo working as shown here https://jasonslyvia.github.io/react-lazyload/examples/#/fadein
For some reason, although there were no errors, the images would not actually fade in, but would still just “pop in”.
I thought upgrading to v2.0 of react-lazyload might help but instead it showed an error in the console.
Here is my code
<LazyLoad height={233} throttle={300} once>
<CSSTransitionGroup key="1"
transitionName="fade"
transitionAppear
transitionAppearTimeout={500}
transitionEnter={false}
transitionLeave={false}>
{ Card.generateImage(this.props.imgSource, this.props.imgAlt) }
</CSSTransitionGroup>
</LazyLoad>
Here is the error I am seeing in the browser
6warning.js:33 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check the render method of `Card`.
in Card (created by EventsList)
in div (created by EventsList)
in div (created by EventsList)
in div (created by EventsList)
in EventsList (created by NavigationBar)
in div (created by NavigationBar)
in div (created by TabPane)
in Transition (created by Fade)
in Fade (created by TabPane)
in TabPane (created by Tab)
in Tab (created by NavigationBar)
in div (created by TabContent)
in TabContent (created by Tabs)
in div (created by Tabs)
in TabContainer (created by Tabs)
in Tabs (created by Uncontrolled(Tabs))
in Uncontrolled(Tabs) (created by NavigationBar)
in div (created by NavigationBar)
in div (created by NavigationBar)
in NavigationBar (created by Home)
in div (created by Home)
in Home (created by Bootstrap)
in div (created by Bootstrap)
in Bootstrap
Thanks for this great package, the <LazyLoad>
component is working quite well for!
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
React CSSTransitionGroup is not working (doesn't add classes)
I am currently working on notification component in React. It is working except the transitions.. Somehow its not even adding class.
Read more >CSSTransitionGroup does not animate if child calls ... - GitHub
The problem in my case was that I had hidden the parent container with display:none and was attempting to fade it in, but...
Read more >React Transition Group Demo (forked) - StackBlitz
A create-react-app project based on react, react-dom, react-addons-css-transition-group and @types/react-addons-css-transition-group.
Read more >react-transition-group - npm
A react component toolset for managing animations. Latest version: 4.4.5, last published: 5 months ago. Start using react-transition-group ...
Read more >How to use React CSS Transition Group for Animations
Learn more advanced front-end and full-stack development at: https://www.fullstackacademy.comIn this video, Corryn Young explores how to use ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
faced the same issue even after the migration guide of react-transition-group, no errors on console but the image just pop in as thescientist13 reported
Sure. I made a sandbox demonstrating the issue.
In the sandbox, click the button twice to see the problem with the animation. Then, you can go to “ViewWithLazyLoad.js” and comment out the LazyLoad component. Run the animation again and everything should be fine.