hyeyeon-sun

Make Customer component

import React from 'react';
import logo from './logo.svg';
import React, { Component } from 'react';
import './App.css';
import Customer from './components/Customer'
function App() {
const customer ={
'name': '이혜연',
'birthday': '000416',
'gender': '여자',
'job': '대학생'
}
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<Customer
name={customer.name}
birthday={customer.birthday}
gender={customer.gender}
job={customer.job}
/>
);
}
}
export default App;
......
import React from 'react';
class Customer extends React.Component {
render(){
return(
<div>
<h2>{this.props.name}</h2>
<p>{this.props.birthday}</p>
<p>{this.props.gender}</p>
<p>{this.props.job}</p>
</div>
);
}
}
export default Customer;
\ No newline at end of file