미안하다... 사실 jquery에서도 useRef쓸 수 있다는거 알려줄려고 어그로 끌었다... 진짜 react호환성 실화냐??? 진짜 react는 전설이다...
<div className="slide-content " name='slide-content' ref={resultPreview}>
{/* 선생님의 평가 정보 자동 슬라이딩 */}
{slideContent !== "" && (
<>
<h1 style={{ display: "inline-block" }}>
{slideContent[i].attrClass}반 {slideContent[i].name}
</h1>
<h2>{slideContent[i].recent}</h2>
</>
)}
</div>
dom에서는 유일 요소로 접근하는게 좋다. 하지만 jquery가 ref를 인식 할 수 있을까?
$(resultPreview.current).fadeOut('slow',()=>{
console.log('성공!')
});
css에서 opacityfh 10% keyFrame단위로 fade를 조절 했었는데.. 이제 제이쿼리로 쉽게 구현할 수 있다. 만세!