React 기본 개념 정리
·
React/다시 공부하는 리액트
// 1) Import the React and ReactDOM librariesimport React from 'react';import ReactDOM from 'react-dom/client';// 2) Get a reference to the div with ID rootconst el = document.getElementById('root');// 3) Tell React to take control of that elementconst root = ReactDOM.createRoot(el);// 4) Create a componentfunction App() { return ;}// 5) Show the component on the screenroot.render(); 위 기본적인 틀이다..