wecode!
https://vimeo.com/394175340
https://vimeo.com/394215246
https://vimeo.com/394215568
handleChagne(e) {
this.setState ({
text: e.target.value
}, ()=> console.log(this.state.text) );
}
굳이 콜백함수로 콘솔을 찍을필요가없다
이벤트객체로 들어옴, 이벤트객체가 어떤 값으로 들어오는지 알고있기떄문에 매번 콘솔필요없음
handleChagne(e) {
this.setState ({
text: e.target.value
});
console.log(e.target.value);
}
--> state로 정상적응로 들어가고잇음