import React, { Component } from 'react'; import SearchForm from './SearchForm'; class App extends Component { state = { item:{}, id:'' } changeId=(id)=>{ console.log("changeId : "+id); console.log("http://pjs.dothome.co.kr/ajaxDB3.php?id="+id); fetch("http://pjs.dothome.co.kr/ajaxDB3.php?id="+id) .then(res=>res.json()) .then( (result)=>{ this.setState({ isLoaded: true, item: result }); console.log(result); }, (error)=>{ this.setState({ isLoaded:true, error }); } ); }; render() { const {item} = this.state; return (