Not working animation ReactCSSTransitionGroup?

Why does not the animation?
import React { Component } from "react";
import style from "./productItem.module.css";
ProductModal from import "../productModal/productModal";
import ReactCSSTransitionGroup from "react-addons-css-transition-group";

class ProductItem extends Component {
 constructor(props) {
super(props);
 this.state = {
 openModal: false
};
}

 getProductById = idProduct => {
 return this.props.productsList.find(product => product.id === idProduct);
};

 openModal = () => {
this.setState({
 openModal: !this.state.openModal
});
};

 render() {
 const productData = this.props.productData;

 return (
the <div>
<div
data-product={productData.id}
onClick={this.openModal}
className={style.item_box}
>
 <a href="#" className={style.item}>
 <div className={style.img_box}>
 <div className={style.img}>
 <img src={productData.img} alt={productData.img} />
</div>
</div>
 <div className={style.title_box}>
 <div className={style.align_m}>
 <span className={style.title}>{productData.title}</span>
</div>
</div>
 <div className={style.backing} />
</a>
</div>
<ReactCSSTransitionGroup
transitionName="example"
transitionAppear={true}
transitionAppearTimeout={700}
transitionEnterTimeout={500}
transitionLeave={true}
transitionLeaveTimeout={800}
>
 {this.state.openModal ? (

<ProductModal
productId={productData.id}
isModalOpened={this.state.openModal}
handleModal={this.openModal}
productsList={this.props.productsList}
getProductById={this.getProductById}
key={productData.id}
/>
):null}
</ReactCSSTransitionGroup>

</div>
);
}
}

export default ProductItem;


.example-enter {
 opacity: 0.01;
}

.example-enter.example-enter-active {
 opacity: 1;
 transition: opacity 500ms ease-in;
}

.example-leave {
 opacity: 1;
}

.example-leave.example-leave-active {
 opacity: 0.01;
 transition: opacity 300ms ease-in;
}


ProductModal component with modal window
ProductItem component to render the item
When you click on the block with the product, you receive a modal window. I want to make animations for modal Windows
March 23rd 20 at 19:33
0 answer

Find more questions by tags React