import { useReducer } from "react" /* https://react.vlpt.us/basic/20-useReducer.html 상태관리방법 1. useState 2. useReducer : 컴포넌트와 상태 업데이트 로직을 분리 가능하도록 구현할 수 있음 - 아키택처: 액션 => reducer -> state -> 뷰(이벤트 발생) 1) reducer는 현재 상태갑인 state와 action인자를 받아서 새로운 nextState값을 반환 import{useReducer} from 'react'; const reducer = (state, action) => { retrun nextState; } 2) action의 형태(dispatch함수로 전달) { type: 'INCREMENT..