[React] Class Component 주소록
2022. 11. 22. 10:34
IT/Front-End
Front-End 기능만을 사용하여 주소록을 만들어보았다. 전화번호 등록 전화번호를 등록할 때는 기본적으로 이름, 전화번호, 이메일 input 3개 입력을 받았다. input.jsx Constructor constructor(props) { super(props); this.state = { firstName: "", lastName: "", phoneNumber: "", email: "", }; } handleChange = (e) => { this.setState({ [e.target.name]: e.target.value, }); }; 연락처 생성 //연락처 생성 onCreate = (data) => { this.setState( { userList: this.state.userList.concat..