import React, { useState, useEffect } from "react";
function PortItem(props) {
const [style, setStyle] = useState({ opacity: 0 });
useEffect(() => {
setTimeout(function () {
setStyle({ opacity: 1 });
}, 3000);
}, []);
return (
<div
className="portItem"
style={style}
onClick={() => props.click(props.pitem.id)}
>
<img src={props.pitem.src} alt={props.pitem.title}></img>
</div>
);
}
export default PortItem;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…