Notice
Recent Posts
Recent Comments
Link
목록2021/08/11 (1)
Silver Library (Archived)
React Props?
react 에서 props 가 쓰이는 용도는 다음과 같습니다. string interpolation. 이게 핵심입니다. 예를 들면 이렇습니다. 아래의 Button.style.js 에 있는 styled(Button) 은 일종의 props (property) 라고 볼 수 있습니다. App.js 의 을 보면 뭘까요. 자, 침착하세요. 이 글을 다시보는 나, 그리고 누군가인 당신도요. 우선 StyledButton 은 변수명입니다. buttonLabel 도 Button.style.js 파일에 있는 변수명입니다. backgroundColor 는 약속된 새로운 react 의 무언가가 아니라, 이게 바로 props 의 정체입니다. 그럼, props 는 어떻게 쓸까요? export const StyledButton = ..
Personal DB/Unclassified record
2021. 8. 11. 17:57