https://reactjs.org/docs/introducing-jsx.html
-
JSX Prevents Injection Attacks
-
Specifying Children with JSX
-
Specifying Attributes with JSX ( use camelCase)
-
Babel compiles JSX down to React.createElement() calls.
셋다 같은 문장 'React elements'
-
const element = ( <h1 className="greeting"> Hello, world! </h1> );
-
const element = React.createElement( 'h1', {className: 'greeting'}, 'Hello, world!' );
-
const element = { type: 'h1', props: { className: 'greeting', children: 'Hello, world!' } };
- 컴포넌트 이름은 항상 대문자로 시작
댓글