[React] 한 태그만 늦게 로드

민병대·2022년 8월 4일
0
const [view, setView] = useState(false);
useEffect(() => {
	setTimeout(() => {
    	setView(true)
    }, 400)
});

...

return (
  {view && (
   <div>늦게 로드</div>
   )}
)
profile
마케터 출신 개발자

0개의 댓글