트러블 이슈 코드 번들링 사이트를 만들던 중 버그가 발견 되었다. 아래 이미지를 보면 왼쪽 검은색 영역이 코드를 작성하는 부분이고, 오른쪽 흰색은 그 코드의 결과가 나오는 화면이다. 그런데 새로고침을 할 때마다 흰색 영역이 한 번 검은색으로 깜빡 거리는 현상이 있었다. code-cell.tsx (코드 결과를 보여주는 React Component) import './code-cell.css'; import { useEffect } from 'react'; import CodeEditor from './code-editor'; import Preview from './preview'; import Resizable from './resizable'; import { Cell } from '../state';..
문제 상황 .tsx에서 아래의 코드 input의 “ref”에 빨간색이 나타나며 마우스를 오버하면 에러 문구가 나타났다. import { useRef } from "react"; export default const UserSearch: React.FC = () => { const inputRef = useRef(); return ( User Search // 아래 ref에 오류 표기 ); }; 에러 문구 Type ‘MutableRefObject' is not assignable to type 'LegacyRef | undefined'. Type 'MutableRefObject' is not assignable to type 'RefObject'. Types of property 'current' are ..