[원티드프리온보딩] 220506

김듑듑·2022년 5월 6일
0

TIL

목록 보기
4/33

event.target VS event.currentTarget


not nest ternary expressions.


Fragments 👉 <>어쩌구</>


스프레드 연산자 👉 {...}


useState, useEffect, async, 비동기 진짜 싫다


여기서부터


A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.


Return values from promise executor functions cannot be read.


어쩌고 should be listed in the project's dependencies


여기까진 해결 못함 언젠간 모두 아는 날이 오겠지


The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers

const [color, setColor] = useState('#ffffff')
…(생략)
<input type='color' value={color} 
        onChange={(e) => {setColor(e.target.value)}} />
  • 아무도 원인을 모른다.... 작동은 되는데 너무 샛노랗게 경고를 해준다....근데 진짜로 내 컴퓨터에서만 이런 오류가 난다고??? 그럼 더 찜찜하다ㅠㅠ 먼길을 돌고돌아 도착한 곳이 경고문이라니이... 비슷하지만 더 간단한 상황만들어서 실험해봤는데 그래도 경고문 뜬다....react-color를 넣었다 뺐다 react-colorful을 넣었다 뺐다가 그냥 돌아온건데.....😭input type='color'일 땐 value값에 변수를 넣으면 안되는건가????? 아니 왜??????? 뭐가 다르지 나정말 이해를 못하겠네....
  • https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color#value
  • 22-05-07 14:07_와우 해결함ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ아니 값을 넣었는데 왜 값이 없다고 하지 잠자면서도 계속 생각하다가 문득 submit하면 값을 flushing하게 한 부분이 거슬려서 고쳤더니 해결됨.....바보다

대학원 갈걸....프론트엔드 길 너무 험하고 험하고....🤦
이건 왜 이러지 찾아보면 그렇게 하라고 했으니까 그냥 그런거야 이런느낌....그냥 그런게 어딨는데....

0개의 댓글