function Modal(props){
return(
<div className="modal">
<h4>{
props.글제목[props.title]
}</h4>
<p>날짜</p>
<p>상세내용</p>
{/* <button onClick={()=>{
let copy = [...props.글제목];
copy[0] = '여자코트 추천'
props.글제목변경(copy)
}}>글수정</button> */}
</div>
)
}
// class를 이용한 옛날 React 문법
class Modal2 extends React.Component {
constructor(){
super();
this.state ={
name:'kim',
age:20
}
}
render(){
return (
<div>안녕{this.state}</div>
)
}
}
이렇게 적었는데
[eslint] src\App.js Line 168:34: 'React' is not defined no-undef Search for the keywords to learn more about each error.
이러한 오류가 생깁니다. 구글에서 찾아봤는데
import React from 'react' 적어야 한다고 해서 적었는데
흰바탕만 보입니다...ㅠㅠ