홈페이지 메인을 벤토 그리드로 꾸미고 싶을 때,
아래의 공식문서를 통해 원하는 그리드를 가져오면된다.
https://mui.com/material-ui/react-masonry/
React Masonry component - Material UI
Masonry lays out contents of varying dimensions as blocks of the same width and different height with configurable gaps.
mui.com
코드를 가져와 사용하던 중
Uncaught SyntaxError: Export 'import_react3' is not defined in module (at chunk-ALR5B6M7.js?v=aa4e0109:17143:3)
위처럼 경고문이 뜨면서 오류나는 경우
npm i @emotion/react @emotion/styled
or
yarn add @emotion/react @emotion/styled
라이브러리를 설치해주고 vs code를 재실행 해주면 해결된다.
'React & TypeScript' 카테고리의 다른 글
[TIL] 옵셔널 체이닝(Optional Chaining)이란 (0) | 2024.06.14 |
---|---|
[TIL] React 'react-router-dom'으로 페이지 연결하기 (0) | 2024.06.11 |
[TIL] 주석으로 함수에 추가설명 넣기 (0) | 2024.05.29 |
[TIL] useState와 useRef의 차이 (0) | 2024.05.28 |
[TIL] 'contents.find' is missing in props validation 경고문 없애기 (0) | 2024.05.27 |