⭐ 기본 구조 이해하기 1. src/index.js import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; const root=ReactDOM.createRoot(document.getElementById("root")); root.render( ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals..
⭐ props부모 컴포넌트가 자식 컴포넌트에 데이터를 전달할 때 사용합니다.props를 전달받은 자식 컴포넌트에서는 데이터를 수정 할 수 없습니다.데이터를 변경하기 위해서는 컴포넌트 내부에서만 사용하는 변수에 값을 넣어 사용해야 합니다1. props 사용하기.class Props extends React.Component { render() { // console.log(this.props); let propsValue = this.props.propsValue; propsValue+=" from App Component."; return ( {propsValue} ); }}class App2 extends React.Component { render() { ..