【发布时间】:2023-02-24 02:39:25
【问题描述】:
当我尝试添加我的 Home-index.js useEffect 时,我的网页完全消失了。这是我的代码。
索引.js
useEffect(() => {
return setTimeout (() => {
setLetterClass('text-animate-hover')
}, 4000)
}, [])
索引.scss
.text-animate-hover {
min-width: 10px;
display: inline-block;
animation-fill-mode: both;
&:hover {
animation: rubberBand 1s;
color: #ff4f00;
}
}
【问题讨论】:
-
这不足以理解您的错误。您能否提供您的 index.js 代码的完整版本?
-
查看指南以提高未来问题的质量。您可以先将其应用于您的问题! stackoverflow.com/help/how-to-ask
标签: reactjs