jsx 파일
const myelement = <h1>I Love JSX!</h1>;
ReactDOM.render(myelement, document.getElementById('root'));
jsx파일 아닌경우
const myelement = React.createElement('h1', {}, 'I do not use JSX!');
ReactDOM.render(myelement, document.getElementById('root'));
HTML elements 가 동작 되도록 도와준다.
https://ko.reactjs.org/docs/introducing-jsx.html
'FE > React & RN' 카테고리의 다른 글
[super props] TypeScript (0) | 2021.07.07 |
---|---|
[react-saga] (0) | 2021.06.09 |
TypeScript ( tsc vs babel 설정 ) (0) | 2021.05.26 |
[ Redux + Saga ] (0) | 2021.04.11 |
[React] arrow function (0) | 2020.02.11 |
댓글