예전부터 사용하던 CSS 나 SCSS와 같이 Style을 정의해서 사용합니다.
파일 구성
SamplePage.jsx
import './style/SamplePage.css'; const SamplePage = () => { return ( <> <div className="titleWrap"> <button className="arrowBack" onClick={() => {}} /> <label style={{ marginLeft: '25px' }}>제목</label> </div> </> ); }; export default SamplePage;
장점
- 기존 퍼블리셔와 역할은 분리할 수 있다.
- Style CSS로 파싱하는 작업이 없기 때문에 React Style 보다 속도가 빠르다.
React Path alias 절대경로 설정 (0) | 2023.01.20 |
---|---|
React Rendering이 두번씩 실행되는 경우 (0) | 2023.01.20 |
CSS in JS : styled-components (0) | 2023.01.20 |
Inline Style CSS (0) | 2023.01.20 |
React Style 적용 방법 (0) | 2023.01.20 |
댓글 영역