React JS (리액트공부)
-
리액트에서 스타일을 관리하는 방법React JS (리액트공부) 2022. 12. 5. 14:28
공식 사이트: https://styled-components.com/ styled-components Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅🏾 styled-components.com 1. 태그에 직접 css 적용 후 사용 2. module.css를 만든뒤 import 해서 사용 - 모듈화하면 className을 자동으로 만들어 중복 충돌을 방지한다. 3. styled components - npm i styled-component (입력) - 설치가 제대로 안된다면 node-modules 폴더 삭제 후 npm i 명령어로 재설치해보기 html 과 r..