분류 전체보기

· IT
const memoizedCallback = useCallback( () => { doSomething(a, b); }, [a, b], ); useCallback은 memoized callback을 리턴한다. memoized는 뭘까? 위키백과에 따르면 In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and returning the cached result when the same inputs occur again. 컴퓨팅에서 memoization 또는 memo..
· IT/CSS
px 기본적인 단위로 고정된 값 rem 페이지의 최상위 요소(root)의 폰트 사이즈를 기준으로 결정 최상위 요소(root)의 폰트 사이즈 * rem 단위 html { font-size: 10px; } div { width:3em; } div의 width는 10px*3=30px이 된다. em 부모 요소의 폰트 사이즈를 기준으로 자식 요소의 크기가 결정 부모 요소 폰트 사이즈 * em 단위 html { font-size: 10px; } div { width:3em; font-size: 20px; } div의 width는 20px*3=60px이 된다. % 화면에서 차지하는 비중
· IT/React
장점 - children, propTypes, contextTypes, defaultProps, displayName이 기본적으로 있다. 단점 - children이 필요하지 않는 경우에도 들어가 있으므로 타입이 명확하지 않다! type FC = FunctionComponent; interface FunctionComponent { (props: PropsWithChildren, context?: any): ReactElement | null; propTypes?: WeakValidationMap | undefined; contextTypes?: ValidationMap | undefined; defaultProps?: Partial | undefined; displayName?: string | unde..
· IT/CSS
CSS in JS (스타일 정의를 css파일이 아닌 JavaScript로 작성된 컴포넌트에 바로 삽입하는 스타일) 스타일에 대한 고유한 클래스 이름을 생성 설치 # with npm npm install --save styled-components # with yarn yarn add styled-components ThemeProvider import styled, { ThemeProvider } from 'styled-components'; const Box = styled.div` color: ${(props) => props.theme.color}; `; function App() { return ( I'm red! ); } export default App;
· IT/Git
1. 현재 branch 확인 git branch 2. 원격 저장소 branch 확인 git branch -r 3. 원격 저장소 branch 가져오기 git checkout -t 원격 저장소 브랜치 이름
솔B
'분류 전체보기' 카테고리의 글 목록 (8 Page)