웹 개발/Frontend
... operation (js 점 세 개 기능)
졸업 작품에서 twine이라는 오픈소스를 뜯어 고치는 중 발견한 ... operation export const CodeArea: React.FC = props => { const {fontFamily, fontScale, label, ...otherProps} = props; //중간 생력 return ( //중간 생략 ) } 위와 같은 코드였다. 여기서 ...otherProps는 앞에 있는 props들의 묶음 역할을 한다고 볼 수 있다. 코드의 가독성을 위한 기능으로 CodeMirror에 {...otherProps} 는 곧 위와 같은 기능을 한다고 한다. 출처 https://stackoverflow.com/questions/31048953/what-are-these-three-dots-in-react..
2023. 6. 1. 23:53