4.25~29 TIL

Steve·2022년 4월 28일
0

Array.from('foo');
["f", "o", "o"]

authMenuRef.current
로그인 됐을떄의 케이스에서 useRef를 쓴이유..
focus를 하기위함이 아니니,,
리렌더링을 막기 위해 사용했다 생각함

authMenu.current.contains(e.target)
외부 클릭 감지

if (ref.current && !ref.current.contains(event.target)) {
        alert("You clicked outside of me!");
}

flex-basis에 관하여

width와 비슷한 면모가 있음
flex-direction에 따라 모양에 변화있음

flex-basis가 더유연.
정해준 영역보다 더 큰 이미지가 안에 있으면 유연하게 같이 늘어남.

width는 안 유연함

mousedown과 click의 차이

mousedown : html element 클릭순간 이벤트 동작
click : 클릭 끝나는 순간 이벤트 동작

mouse

onmouseover,mouseout,mouseenter,mouseleave차이
mouseover-mouseout 짝
mouseenter-mouseleave 짝
자식요소를 포함하느냐 안하느냐 차이
mouseover 사용하면 자식요소에도 적용,
mouseenter은 바인딩 된 요소에만 적용

profile
Front-Dev

0개의 댓글