노마드코더 typescript 완료
React.Dispatch> 상위 컴포넌트에서 useState 상태 변경 함수를 넘길 때 () => void 로 넘겼었는데 정의 할 수 있는 타입이 있었다 ! insight set 함수를 넘길 때는 default 값에 따라 1)string 인 경우 React.Dispatch> 2)boolean 인 경우 React.Dispatch>
'Object literal may only specify known properties, and 'hourDigital' does not exist in type '
참고 https://merrily-code.tistory.com/209 자식 요소 감싸는 래퍼 컴포넌트를 작성할 때 자식 요소인 children 속성의 타입을 명시해야 하는 경우가 많다. 종류 ReactChild ReactElement ReactNode React.
4개의 에러 모두 같은 이유이다. Property ' ' does not exist on type '타입 '선택적 매개변수이기 때문에 ? 를 추가했다. type을 전체적으로 통하게 만든다.