www.youtube.com/watch?v=eQkkoUEVY-Q
www.youtube.com/watch?v=c5-Vex3ufFU&t=372s
[공부해야 할 것]
- styled-component와 연산자(operators)
- styled-component와 Hooks(useState)
[ThemeProvider]
1. npm install --save styled-theming
2. import { ThemeProvide } from 'styled-components'
3. <ThemeProvider> accepts a single proptheme which you should pass an object with either strings or getter functions. For example:
theme(name, values)
name should match one of the keys in your <ThemeProvider> theme.
theme.variants(name, prop, themes)
[styled-compnents rules]
1. Define Styled Components outside of the render method
It is important to define your styled components outside of the render method, otherwise it will be recreated on every single render pass. Defining a styled component within the render method will thwart caching and drastically slow down rendering speed, and should be avoided.
'React.js' 카테고리의 다른 글
[react-router nesting 연습] (0) | 2020.09.23 |
---|---|
react-router-dom (0) | 2020.09.21 |
create-react-app 파일 구조. [정보 찾아야 함] (0) | 2020.09.15 |
Axios tutorial#3: When using multiple API's (0) | 2020.09.14 |
Axios tutorial#1 (feat. constructor 생성자) (0) | 2020.09.14 |
댓글