reactjs - Unknown property on TransitionGroup - React Animation -


i getting error "warning.js:36 warning: unknown props onexited, appear, enter, exit on tag. remove these props element. details, see ... in div (created tripfilteredlist) in div (created transitiongroup) in transitiongroup (created tripfilteredlist) in div (created tripfilteredlist) in tripfilteredlist (created tripsortedlist) in div (created tripsortedlist) in tripsortedlist (created tripfinder) in div (created tripfinder) in tripfinder"

i using

import transitiongroup 'react-transition-group/transitiongroup';           <transitiongroup component="div" childfactory={child => child} >             <div classname={`cards ${display === 'other' ? 'search-results__other-content' : ''}`}>                  {display === 'row' &&                     tripfilteredlist.map((data, index) => <triprow key={index} {...data} />)                 }              </div>         </transitiongroup> 

the trip row code

    import react, { component } 'react';     import proptypes 'prop-types';     import { fade } '../../components';      export default class triprow extends component {          constructor(props) {             super(props);             this.state = {                 animationtrigger: false             };         }          componentwillmount() {             this.setstate({                 animationtrigger: true             });         }          componentwillunmount() {             this.setstate({                 animationtrigger: false             });         }          render() {             const { title, id, thumbnailurl, startlocation, endlocation, price, departuredate, summary, duration, countries, lastseats, bestvalue } = this.props;             const style = {                 backgroundimage: `url(${thumbnailurl})`             };             return (                 <fade in={this.state.animationtrigger}>                     <div classname="trip-finder__card-row">                           content here                     </div>                 </fade>              );         }       } 

and fade class

    import csstransition 'react-transition-group/csstransition';      import react 'react';      const fade = ({ children, ...props }) => {          return (              <csstransition                 {...props}                 timeout={{enter: 500,exit: 500}}                 classnames="fade"             >                 {children}             </csstransition >         );     };      export default fade; 

the fade class generic class , used in other places in project well. have fade component renders children (list rows). knows whats warning , how can fix it?

here css

    .fade-enter,     .fade-appear,     .fade-exit {         transition: 500ms;     }     .fade-enter,     .fade-appear {         opacity: 0;     }     .fade-enter-active,     .fade-appear-active {         opacity: 1     }     .fade-exit {         transition: 500ms;         opacity: 1;     }     .fade-exit-active {         opacity: 0     } 

resolved! transition (triprow) component needs direct children of transition group.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -