728x90 반응형 IT/React36 Props 개념 1. 컴포넌트 사이에서 전달하는 데이터를 의미함. 2023. 1. 10. 'index.tsx' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.ts(1208) index.tsx 파일을 만들어 아래와 같이 했더니 function 아래 붉은줄이 그어지면 나타난 에러... function TodoInput() { return ; } export default 를 넣으니 사라짐. export default function TodoInput() { return ; } 그러나 return 문 뒤 꺽쇠에 다시 붉은 줄.. 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.ts(26 tsconfig.json 파일에 "jsx" : "react" 이렇게 되어 있던 것을 "jsx" : "react-jsx" 로 변경하니 해결됨 2023. 1. 10. JSX 구성 요소로 사용할 수 없습니다. 해당 반환 형식 'void'은(는) 유효한 JSX 요소가 아닙니다 왜 뜨는지는 아직 이유와 해결법을 모름. 2023. 1. 9. 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead. 뭔소리인지는 도통 모르겠는데, tsconfig.json 파일의 jsx 설정을 변경하니 에러가 뜨지 않음 "compilerOptions" 에 "jsx":"react" --> "jsx":"react-jsx" 로 변경함 2023. 1. 9. 이전 1 2 3 4 5 6 7 ··· 9 다음 728x90 반응형