\(@^0^@)/
React Quiz 본문
최근에 유데미에서 리액트 강의를 듣고 있는데, 아마 각 섹션마다 퀴즈가 있는 것 같음.
지금은 초반이라 아직 쉬운 개념들이지만, 나중에 후반으로 가면 헷갈렸던 용어들 재확인할 수 있는 좋은 기회!
쨋든 나중에 면접에 도움 될거 같으니, 차근차근 용어 및 정의들을 정리해보자. ( + 영어공부)
Q : What is "JSX"?
A : It's a special, non-standard syntax which is enabled in React projects.
React 프로젝트에서 활성화되는 특수한 비표준 구문.
+ React projects like the ones we create via "crate-react-app" supoort JSX syntax. it gets compile to standard JS code behind the scenes.
"create-react-app"을 통해 생성한 것과 같은 React 프로젝트는 JSX 구문을 지원합니다. 뒤에서 표준 JS 코드로 컴파일됩니다.
Q : Why is React all about "Components"?
A : Every UI in the end up is made up of multiple building blocks (= components), hence it makes sense to think about user interfaces as "combinations of components"
결국 모든 UI는 여러 빌딩 블록 (= 구성 요소)으로 구성되므로 사용자 인터페이스를 "구성 요소의 조합"으로 생각하는 것이 좋다.
+ "Components" are really just a way of thinking about user interfaces. React embraces that concept and gives you tools to build components that you can then combine.
"구성 요소"는 실제로 사용자 인터페이스에 대한 사고방식입니다. React는 이러한 개념을 수용하고 결합할 수 있는 구성 요소를 빌드할 수 있는 도구를 제공합니다.
Q : What is a "React Component"?
A : It's a JavaScript function which typically returns HTML (JSX) code that should be displayed.
일반적으로 표시되어야 하는 HTML(JSX) 코드를 반환하는 JavaScript 함수.
+ A component is just thatL A JS function that typically returns some HTML (or, to be precise: JSX) code which will be shown on the screen when that component is used.
구성 요소는 다음과 같습니다. 일반적으로 해당 구성 요소가 사용될 때 화면에 표시될 일부 HTML(또는 정확하게는 JSX) 코드를 반환하는 JS 함수입니다.
Q : Which statement is correct?
A : With React, you build a component tree with one root component that's mounted into a DOM node
React를 사용하면 DOM 노드에 마운트된 하나의 루트 구성 요소로 구성 요소 트리를 구축할 수 있다.
+ You build a component tree that has one root node.
하나의 루트 노드가 있는 구성 요소 트리를 빌드합니다.
Q : What does "component tree" mean?
A : It means that you have a root node which then has more components nested beneath it.
이는 루트 노드가 있고 그 아래에 더 많은 구성 요소가 중첩되어 있음을 의미한다.
+ You build a tree by nesting components into each other - just as you build a HTML tree when building a standard HTML document.
표준 HTML 문서를 작성할 때 HTML 트리를 작성하는 것처럼 구성요소를 서로 중첩하여 트리를 작성합니다.
Q : How do you pass data between components?
A : Via "custom HTML attributes" (better known as "props")
"사용자 정의 HTML 속성" ("props"로 더 잘 알려져 있음)을 통해.
+ You build your own "HTML elements" in the end, hence you can also define your own attributes (called "props" in React's world)
자신만의 "HTML 요소"를 빌드하므로 고유한 속성(React의 세계에서는 "props"라고 함)을 정의할 수도 있습니다.
※ 출처 : https://www.udemy.com/course/react-the-complete-guide-incl-redux/learn/quiz/5187734#overview
'TIL' 카테고리의 다른 글
useState( ) vs useReducer( ) (0) | 2021.11.01 |
---|---|
React Quiz (0) | 2021.10.23 |
[JS] PadStart(), PadEnd() (0) | 2021.09.29 |
[JS] 좌표 CSS, JS / client, page (0) | 2021.09.22 |
[JS] 스크립트 defer, async (0) | 2021.09.22 |